Skip to content

Commit 3cbfb10

Browse files
authored
Update GitHub Actions workflow for Python app
1 parent c0293ab commit 3cbfb10

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/python-app.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,38 @@
1-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3-
41
name: Pytest
52

63
on:
74
push:
85
branches: [ "dev" ]
96
pull_request:
10-
branches: [ "main" ]
7+
branches: [ "main", "dev" ]
118

129
permissions:
1310
contents: read
1411

1512
jobs:
1613
build:
17-
1814
runs-on: ubuntu-latest
1915

2016
steps:
2117
- uses: actions/checkout@v4
18+
2219
- name: Set up Python 3.10
23-
uses: actions/setup-python@v3
20+
uses: actions/setup-python@v5
2421
with:
2522
python-version: "3.10"
23+
cache: 'pip'
24+
2625
- name: Install dependencies
2726
run: |
2827
python -m pip install --upgrade pip
2928
pip install flake8 pytest
3029
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
30+
3131
- name: Lint with flake8
3232
run: |
33-
# stop the build if there are Python syntax errors or undefined names
3433
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3634
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
35+
3736
- name: Test with pytest
3837
run: |
3938
pytest

0 commit comments

Comments
 (0)