diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6cf0c203..459e1601 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,6 +50,8 @@ jobs: # When using `act` to run the workflow locally, the `poetry install` command # may fail due to network issues when running multiple Docker containers. run: poetry install -E test || poetry install -E test || poetry install -E test + - name: Typecheck + run: poetry run bash scripts/typecheck.sh - name: Test run: poetry run bash scripts/test.sh - name: Upload coverage diff --git a/scripts/lint.sh b/scripts/lint.sh index 02f9c70a..61324ea6 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -2,5 +2,4 @@ set -ex -mypy earthaccess stubs tests ruff check . diff --git a/scripts/test.sh b/scripts/test.sh index b8709814..1c74c349 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -4,4 +4,3 @@ set -e set -x pytest tests/unit --cov=earthaccess --cov=tests --cov-report=term-missing "${@}" -s --tb=native --log-cli-level=INFO -bash ./scripts/lint.sh diff --git a/scripts/typecheck.sh b/scripts/typecheck.sh new file mode 100644 index 00000000..bf70d03c --- /dev/null +++ b/scripts/typecheck.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -ex + +mypy earthaccess stubs tests