Skip to content

Commit

Permalink
feat: lint tests directory (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
msto authored Jul 18, 2024
1 parent dfcb7e2 commit d384daa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ jobs:
- name: Style checking
shell: bash
run: |
poetry run ruff format --check fgpyo
poetry run ruff format --check fgpyo tests
- name: Run lint
shell: bash
run: |
poetry run ruff check fgpyo
poetry run ruff check fgpyo tests
- name: Run mypy
shell: bash
run: |
poetry run mypy -p fgpyo --config=ci/mypy.ini
poetry run mypy fgpyo tests --config=ci/mypy.ini
- name: Run pytest
shell: bash
Expand Down
11 changes: 5 additions & 6 deletions ci/check.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

function banner() {
echo
Expand Down Expand Up @@ -37,12 +37,11 @@ function run() {

parent=$(cd $(dirname $0) && pwd -P)

banner "Executing in conda environment ${CONDA_DEFAULT_ENV} in directory fgpyo"
run "Style Checking" "ruff format fgpyo"
run "Linting" "ruff check --fix fgpyo"
run "Type Checking" "mypy -p fgpyo --config $parent/mypy.ini"
run "Style Checking" "ruff format fgpyo tests"
run "Linting" "ruff check --fix fgpyo tests"
run "Type Checking" "mypy fgpyo tests --config $parent/mypy.ini"
run "Unit Tests" "python -m pytest -vv -r sx tests"
run "Make docs" "poetry run mkdocs build --strict"
run "Make docs" "mkdocs build --strict"

if [ -z "$failures" ]; then
banner "Checks Passed"
Expand Down

0 comments on commit d384daa

Please sign in to comment.