Skip to content

Commit e992720

Browse files
committed
10 | Add mounting in workflow to transfer the coverage data correctly
1 parent f392bbe commit e992720

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.github/workflows/test.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,15 @@ jobs:
1717
- name: Build Docker image
1818
run: docker build . -t flask-inputfilter
1919

20-
- name: Run tests in Docker
20+
- name: Run tests in Docker and upload coverage to Coveralls
21+
env:
22+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
2123
run: |
2224
set -x # Print commands and their arguments as they are executed.
2325
set -e # Exit immediately if a command exits with a non-zero status.
2426
set -u # Exit immediately if a variable is not defined.
2527
26-
docker run flask-inputfilter coverage run --source=flask_inputfilter -m pytest test/
27-
28-
- name: Upload coverage to Coveralls
29-
env:
30-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
31-
run: docker run -e COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} flask-inputfilter coveralls
28+
docker run -e COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} flask-inputfilter sh -c "coverage run --source=flask_inputfilter -m pytest test/ && coveralls"
3229
3330
- name: Run code style checks
3431
run: |

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ pillow==8.0.0
77
pytest
88
requests==2.22.0
99
coveralls
10+
coverage

0 commit comments

Comments
 (0)