merge: v2.0
#166
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "coverage" | |
on: | |
pull_request: | |
branches: | |
- main | |
- staging | |
- dev/* | |
jobs: | |
report-coverage: | |
name: Coverage Report | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
cache: "pip" # caching pip dependencies | |
- name: Install pipenv | |
run: pip install pipenv | |
- run: pipenv requirements > requirements.txt | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run unit test suite | |
run: pytest --cov-report xml --cov=. tests/ | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
- name: Get and report coverage | |
uses: orgoro/[email protected] | |
with: | |
coverageFile: coverage.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
thresholdAll: 0.7 |