diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..5932cbc --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,34 @@ +name: Lint and unit tests + +on: + pull_request: + push: + branches: + - main + +jobs: + lint: + name: Lint (Python ${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ['3.10', '3.12'] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Install dependencies + run: pip install --quiet tox + + - name: Run linting + run: | + tox -e pep8 + tox -e mypy + tox -e flake8 diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..975dfb2 --- /dev/null +++ b/mypy.ini @@ -0,0 +1,7 @@ +[mypy] +python_version = 3.10 +strict = False +disable_error_code = import-untyped,import-not-found +# TODO: consider enabling the following once +# all optional values are explicitly specified. +no_implicit_optional = False