Skip to content

Commit

Permalink
Merge pull request #5 from ajatkj/update_coverage_in_workflow
Browse files Browse the repository at this point in the history
update_coverage_in_workflow
  • Loading branch information
ajatkj authored Feb 8, 2024
2 parents 3d0bdf4 + a5dcfe3 commit 9d14a2d
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -35,6 +35,7 @@ jobs:
- name: Test
run: |
poe coverage
poe coverage_report
env:
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
Expand All @@ -50,11 +51,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: get coverage files
- name: Get coverage files
uses: actions/download-artifact@v4
with:
merge-multiple: true
Expand All @@ -70,3 +75,22 @@ jobs:
with:
name: coverage-html
path: htmlcov

# https://github.com/marketplace/actions/alls-green
check: # This job does nothing and is only used for the branch protection
if: always()
outputs:
result: ${{ steps.all-green.outputs.result }}
needs:
- coverage-combine
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
id: all-green
with:
jobs: ${{ toJSON(needs) }}

0 comments on commit 9d14a2d

Please sign in to comment.