extra assert #151
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: All Teams Workflow | |
on: | |
push: | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- app: core | |
- app: fruits | |
- app: emotions | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10.10' | |
- name: Install requirements | |
run: | | |
pip install -r requirements.txt | |
pip install codecov-cli | |
- name: Run tests and collect coverage (with labels) | |
run: | | |
python -m pytest ${{ matrix.app }}/** --cov=./${{ matrix.app }} --cov-report="xml:.artifacts/${{ matrix.app }}.coverage.xml" --cov-context=test | |
coverage json -o .artifacts/${{ matrix.app }}.coverage.json --show-contexts | |
- name: Upload to codecov | |
run: | | |
codecovcli --url=${{ secrets.CODECOV_STAGING_URL }} do-upload --flag ${{ matrix.app }} --file .artifacts/${{ matrix.app }}.coverage.xml --disable-search --token=${CODECOV_TOKEN} | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_STAGING_TOKEN }} | |
# This is temporary because codecov/codecov-action@v4-beta | |
# Doesn't support --disable-search option | |
# And we don't want to upload random reports (for safety) | |
- name: Clean XML report | |
if: ${{ matrix.app == 'core' }} | |
run: | | |
rm .artifacts/core.coverage.xml | |
- name: Upload to codecov - special case test ATS | |
if: ${{ matrix.app == 'core' }} | |
run: | | |
codecovcli --url=${{ secrets.CODECOV_STAGING_URL }} do-upload --flag smart-tests --plugin compress-pycoverage --file .artifacts/core.coverage.codecov.json --token=${CODECOV_TOKEN} | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_STAGING_TOKEN }} |