Skip to content

Commit

Permalink
ci: 🎡 use working-directory field, and fix flag name
Browse files Browse the repository at this point in the history
  • Loading branch information
severo committed Nov 8, 2022
1 parent 70ccd4d commit fa2e282
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/_unit-tests-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,14 @@ jobs:
CACHE_MONGO_URL: mongodb://localhost:${{ env.mongo-port }}
QUEUE_MONGO_URL: mongodb://localhost:${{ env.mongo-port }}
run: poetry run python -m pytest -s --cov=./ --cov-report=xml:./coverage.xml --cov-report=term tests
- name: Prepare codecov flag (slash "/" is not allowed)
id: remove-slash
run: |
dir = ${{ inputs.working-directory }}
echo "codecov_flag=${dir/\//_}" >> $GITHUB_ENV
- uses: codecov/codecov-action@v3
with:
files: ${{ inputs.working-directory }}/coverage.xml
working-directory: ${{ inputs.working-directory }}
files: ./coverage.xml
fail_ci_if_error: true
flags: ${{ inputs.working-directory }}
flags: ${{ env.codecov_flag }}

0 comments on commit fa2e282

Please sign in to comment.