Codecov comments added on PR opens/changes #38
Workflow file for this run
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: codecov.yml | |
# Run Codecov on PR open or change | |
on: pull_request | |
jobs: | |
codecov: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out this repository code | |
uses: actions/checkout@v3 | |
with: | |
path: empower | |
fetch-depth: 0 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Run React tests | |
run: | | |
npm install | |
npm test -- --coverage | |
working-directory: ./empower/react | |
- name: Run Python Tests | |
run: | | |
pip install -U pytest | |
pip install pytz | |
pip install pytest-codecov | |
pytest --cov=. --cov-report=xml | |
working-directory: ./empower/flask/src | |
## Must be uploaded separately for flags to work properly | |
- name: Upload React coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: react | |
## Must be uploaded separately for flags to work properly | |
- name: Upload Flask coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: react | |
- run: echo "Job status is ${{ job.status }}." |