Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 42 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,30 @@ jobs:
include-hidden-files: true
path: ./.coverage

get-pacemaker-run:
needs: build
runs-on: ubuntu-latest
outputs:
run_id: ${{ steps.get-run.outputs.run_id }}
steps:
- name: Get latest successful Pacemaker run ID
id: get-run
run: |
RUN_ID=$(gh run list \
--repo ${{ github.repository }} \
--workflow="Testing Pacemaker (Python 3.10)" \
--branch=main \
--status=success \
--limit=1 \
--json databaseId \
-q '.[0].databaseId')
echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

commit-durations:
if: github.repository_owner == 'autoatml' && github.ref == 'refs/heads/main'
needs: build
needs: [build, get-pacemaker-run]
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -102,6 +123,13 @@ jobs:
with:
pattern: test-durations-*

- name: Download Pacemaker test duration artifacts
continue-on-error: true
uses: actions/download-artifact@v4
with:
pattern: test-durations-pacemaker
run-id: ${{ needs.get-pacemaker-run.outputs.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Compute average of test durations
run: |
Expand All @@ -123,22 +151,33 @@ jobs:
base: main

coverage:
needs: build
needs: [build, get-pacemaker-run]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Coverage
run: |
python -m pip install coverage[toml]

- name: Download coverage artifacts
continue-on-error: true
uses: actions/download-artifact@v4
with:
pattern: coverage-*

- name: Download Pacemaker coverage artifacts
continue-on-error: true
uses: actions/download-artifact@v4
with:
pattern: coverage-pacemaker
run-id: ${{ needs.get-pacemaker-run.outputs.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Run coverage
continue-on-error: true
run: |
Expand Down
Loading