Skip to content

Commit

Permalink
check if coverage is set to github
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Jun 21, 2024
1 parent a10d9db commit 7ebc46c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ jobs:
envs:
name: Load tox environments
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-outputs.outputs.matrix }}
steps:
- name: workflow inputs
run: echo "${{ toJSON(inputs) }}"
- uses: actions/setup-python@v5
with:
python-version: '3.12'
Expand All @@ -144,6 +140,8 @@ jobs:
--runs-on "${{ inputs.runs-on }}" --default-python "${{ inputs.default_python }}" \
--timeout-minutes "${{ inputs.timeout-minutes }}"
shell: sh
outputs:
matrix: ${{ steps.set-outputs.outputs.matrix }}

tox:
name: ${{ matrix.name }}
Expand Down Expand Up @@ -233,21 +231,23 @@ jobs:

- if: ${{ (success() || failure()) && contains(matrix.coverage, 'github') && matrix.pytest == 'true' }}
run: |
mv .coverage .coverage.${{ runner.os }}-${{ matrix.toxenv }}
mv .coverage .coverage.${{ runner.os }}-${{ runner.arch }}-${{ matrix.toxenv }}
ls -la .
- name: Upload coverage data to GitHub
if: ${{ (success() || failure()) && contains(matrix.coverage, 'github') && matrix.pytest == 'true' }}
uses: actions/upload-artifact@v4
with:
name: .coverage.${{ runner.os }}-${{ matrix.toxenv }}
path: .coverage.${{ runner.os }}-${{ matrix.toxenv }}
name: .coverage.${{ runner.os }}-${{ runner.arch }}-${{ matrix.toxenv }}
path: .coverage.${{ runner.os }}-${{ runner.arch }}-${{ matrix.toxenv }}

coverage:
name: test coverage
needs:
- envs
- tox
if: inputs.coverage == 'github'
if: >
contains('\"coverage\": \"github\"', needs.envs.outputs.matrix)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 7ebc46c

Please sign in to comment.