Skip to content
Open
Show file tree
Hide file tree
Changes from 9 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
9 changes: 6 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ jobs:
contents: write
pull-requests: write
steps:
- name: Print github run_id
run: echo "${{ github.run_id }}"

- name: "Checkout repository 🛎"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
Expand Down Expand Up @@ -173,7 +176,7 @@ jobs:
- name: "Checkout repository 🛎"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
persist-credentials: true

- name: "Setup CI environment 🛠"
uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@4a1e7898d6c92dade5e489684277ab4ffd0eb053
Expand Down Expand Up @@ -203,10 +206,10 @@ jobs:
# ensures this runs even if the coverage step does not continue - e.g. the
# default coverage action will fail at first for external PRs, this is a workaround
# to ensure the comment is posted
if: ${{ github.event.name == 'pull_request'}}
if: ${{ github.event_name == 'pull_request'}}
with:
# this is the workflow run ID of the `CI.yml` workflow
workflow_run_id: ${{ github.event.workflow_run.id }}
workflow_run_id: ${{ github.run_id }}
permissions:
contents: write
pull-requests: write
Expand Down
24 changes: 4 additions & 20 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,11 @@
contents: write # needed to edit the comment vs opening multiple ones
actions: read
steps:
- name: "Get the triggering workflow run details"
id: get-run
uses: octokit/request-action@dad4362715b7fb2ddedf9772c8670824af564f0d
with:
route: GET /repos/"${REPO}"/actions/runs/"${WORKFLOW_RUN_ID}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
WORKFLOW_RUN_ID: ${{ inputs.workflow_run_id }}

# this needs the .coverage file so we download from the CI workflow artifacts
- name: "Download coverage data 📥"
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
pattern: coverage-data-*
merge-multiple: true
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ inputs.workflow_run_id }}
- name: Print workflow_run_id input
run: echo "${{ inputs.workflow_run_id }}"

- name: "Check downloaded files"
run: ls -R
- name: Print github run_id
run: echo "${{ github.run_id }}"

- name: "Post coverage comment 💬"
uses: py-cov-action/python-coverage-comment-action@970a227e0c16ef4589a99a9970ab0ceb8c53059a
Expand Down
Loading