Skip to content

Commit

Permalink
fix: Using single job
Browse files Browse the repository at this point in the history
  • Loading branch information
gitaroktato committed Apr 9, 2024
1 parent 61fe0cb commit 544b2e6
Showing 1 changed file with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,20 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install flake8 pytest mypy
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run mypy
uses: sasanquaneuf/mypy-github-action@releases/v1
with:
checkName: 'build' # NOTE: this needs to be the same as the job name
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test with pytest
run: |
pytest
mypy:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.12"
cache: 'pip' # caching pip dependencies
- name: Checkout
uses: actions/checkout@v1
- name: Install mypy
run: |
python -m pip install --upgrade pip
pip install mypy
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run mypy
uses: sasanquaneuf/mypy-github-action@releases/v1
with:
checkName: 'mypy' # NOTE: this needs to be the same as the job name
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 544b2e6

Please sign in to comment.