Skip to content

Commit c0c10fa

Browse files
committed
Updated codecov to v5
1 parent 37b7329 commit c0c10fa

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,22 @@ jobs:
3434
--health-retries 5
3535
3636
steps:
37-
- uses: actions/checkout@v2
37+
- name: Checkout
38+
uses: actions/checkout@v3
39+
40+
- name: Install Python package dependencies
41+
run: |
42+
python -m pip install -U pip pipenv
43+
pipenv install --system --dev
3844
39-
- name: Install dependencies
45+
- name: Run Code Quality Checks
4046
run: |
41-
python -m pip install -U pip poetry
42-
poetry config virtualenvs.create false
43-
poetry install
47+
# stop the build if there are Python syntax errors or undefined names
48+
flake8 service tests --count --select=E9,F63,F7,F82 --show-source --statistics
49+
# check for complexity. The GitHub editor is 127 chars wide
50+
flake8 service tests --count --max-complexity=10 --max-line-length=127 --statistics
51+
# Run pylint on the service
52+
pylint service tests --max-line-length=127
4453
4554
- name: Create the test database
4655
run: |
@@ -49,11 +58,16 @@ jobs:
4958
curl -X PUT http://admin:pass@couchdb:5984/test
5059
5160
- name: Run unit tests with pytest
52-
run: pytest --pspec --cov=service --cov-fail-under=95 --disable-warnings
61+
run: pytest --pspec --cov=service --cov-fail-under=95 --disable-warnings --cov-report=xml
5362
env:
5463
FLASK_APP: "wsgi:app"
5564
BINDING_CLOUDANT: '{"username":"admin","password":"pass","host":"couchdb","port":5984,"url":"http://admin:pass@couchdb:5984"}'
5665

57-
- name: Upload code coverage
58-
uses: codecov/codecov-action@v3.1.4
66+
- name: Install packages required by Codecov
67+
run: apt-get update && apt-get install -y git curl gpg
5968

69+
- name: Upload coverage reports to Codecov
70+
uses: codecov/codecov-action@v5
71+
with:
72+
token: ${{ secrets.CODECOV_TOKEN }}
73+
slug: nyu-devops/lab-flask-restplus-swagger

0 commit comments

Comments
 (0)