66# events but only for the master branch
77on :
88 push :
9- branches : [ master ]
9+ branches : [master]
1010 pull_request :
11- branches : [ master ]
11+ branches : [master]
1212
1313# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1414jobs :
@@ -19,22 +19,31 @@ jobs:
1919
2020 # Steps represent a sequence of tasks that will be executed as part of the job
2121 steps :
22- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23- - uses : actions/checkout@v2
22+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23+ - uses : actions/checkout@v2
2424
25- - name : Set up Python
26- uses : actions/setup-python@v2
27- with :
28- python-version : ' 3.x'
25+ - name : Set up Python
26+ uses : actions/setup-python@v2
27+ with :
28+ python-version : " 3.x"
2929
30- - name : Install global dependencies
31- run : python -m pip install -U pip setuptools wheel
30+ - name : Install global dependencies
31+ run : python -m pip install -U pip setuptools wheel
3232
33- - name : Install deps
34- run : pip install -r requirements.txt
33+ - name : Install deps
34+ run : pip install -r requirements.txt
3535
36- - name : Install password_validator
37- run : pip install .
36+ - name : Install dev deps
37+ run : pip install -r requirements-dev.txt
3838
39- - name : Run tests
40- run : python -m unittest discover tests -v
39+ - name : Install password_validator
40+ run : pip install .
41+
42+ - name : Run tests
43+ run : coverage run --source src -m unittest discover -s tests -v
44+
45+ - name : Generate coverage report
46+ run : coverage report
47+
48+ - name : Upload coverage report to Codecov
49+ uses : codecov/codecov-action@v1
0 commit comments