Merge pull request #389 from mollie/add-fix-codestyle #288
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run tests | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_call: | |
| jobs: | |
| tests: | |
| name: Run all tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.9", "pypy-3.10"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install . | |
| python -m pip install -r test_requirements.txt | |
| - name: Run unittests | |
| run: python -m pytest --cov-fail-under=90 | |
| - name: Verify dependencies | |
| # Jinja, https://data.safetycli.com/v/70612/97c | |
| # urllib3, https://data.safetycli.com/v/77744/97c, only when using python 3.8. Consider upgrading. | |
| # setuptools, https://data.safetycli.com/v/76752/97c, only when using python 3.8. Consider upgrading. | |
| # regex, https://data.safetycli.com/v/78558/97c, only when using python 3.8. Consider upgrading. | |
| # pip, https://data.safetycli.com/v/79883/97c, only when using python 3.8. Consider upgrading. | |
| # authlib, https://data.safetycli.com/v/79756/97c, only when using python 3.8. Consider upgrading. | |
| run: python -m safety check --ignore 70612 --ignore 77744 --ignore 77745 --ignore 76752 --ignore 78558 --ignore 79883 --ignore 79756 | |
| - name: Verify code style | |
| run: python -m flake8 -v | |
| - name: Verify type annotations | |
| run: | | |
| python -m pip install mypy | |
| python -m mypy --config mypy.ini mollie/ |