Skip to content

Commit 7207f3a

Browse files
authored
Merge pull request #50 from nanotaboada/feature/ci
chore: update Python CI workflow
2 parents 380e307 + fa123fa commit 7207f3a

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/python-app.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
1+
# Building and testing Python
2+
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
33

44
name: Python CI
55

@@ -11,32 +11,38 @@ on:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
16-
1715
steps:
18-
- uses: actions/checkout@v4
16+
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
1920
- name: Set up Python 3.9
2021
uses: actions/setup-python@v5
2122
with:
2223
python-version: 3.9
23-
- name: Install dependencies
24+
25+
- name: Install packages with pip
2426
run: |
2527
python -m pip install --upgrade pip
2628
pip install flake8 pytest pytest-cov
2729
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
30+
2831
- name: Lint with Flake8
2932
run: |
3033
# stop the build if there are Python syntax errors or undefined names
3134
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3235
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3336
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37+
3438
- name: Run tests with pytest
3539
run: |
3640
pytest -v
41+
3742
- name: Generate coverage report with pytest-cov
3843
run: |
3944
pytest --cov=./ --cov-report=xml
45+
4046
- name: Upload coverage report to Codecov
4147
uses: codecov/codecov-action@v4
4248
with:

0 commit comments

Comments
 (0)