Skip to content

Commit

Permalink
Update (ci): github action's artifact upgrade v4
Browse files Browse the repository at this point in the history
  • Loading branch information
alleeclark committed Dec 17, 2024
1 parent 9fad00e commit cf59473
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/actions/job-dump/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
shell: bash

- name: Upload pytest test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact-name }}
path: meta.json
43 changes: 22 additions & 21 deletions .github/workflows/ci_compatible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ jobs:
echo $pr_runtimes
echo "runtimes={include: $pr_runtimes}" >> $GITHUB_OUTPUT
- run: echo "[]" > projects.json
- name: Upload placeholder
uses: actions/upload-artifact@v3
with:
name: compatibility-${{ github.sha }}
path: projects.json

pytester:
needs: generator
runs-on: ${{ matrix.os }}
Expand All @@ -70,25 +63,16 @@ jobs:
if: always()
uses: ./.github/actions/job-dump
with:
artifact-name: project-${{ github.sha }}-${{ strategy.job-index }}
artifact-name: project-${{ github.sha }}-${{ strategy.job-index }}-pytester

collector:
runs-on: ubuntu-latest
needs: [generator, pytester]
if: always()
strategy:
max-parallel: 1 # run sequential to prevent download/upload collisions
matrix: ${{ fromJSON(needs.generator.outputs.matrix) }}
steps:
- name: Download 📥 summary
uses: actions/download-artifact@v3
with:
name: compatibility-${{ github.sha }}
- name: Download 📥 project
uses: actions/download-artifact@v3
with:
name: project-${{ github.sha }}-${{ strategy.job-index }}

- run: echo "[]" > projects.json
- run: ls -l
- name: append result
run: |
Expand All @@ -101,8 +85,14 @@ jobs:
json.dump(data, fp)
shell: python

- name: Upload 📥 project
uses: actions/upload-artifact@v4
with:
name: project-${{ github.sha }}-${{ strategy.job-index }}-collector
path: project-${{ github.sha }}-*

- name: Upload pytest test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: compatibility-${{ github.sha }}
path: projects.json
Expand All @@ -129,7 +119,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Download 📥 summary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: compatibility-${{ github.sha }}
- run: cat projects.json
Expand Down Expand Up @@ -170,7 +160,7 @@ jobs:
git config user.email [email protected]
git merge origin/main
- name: Download 📥 summary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: compatibility-${{ github.sha }}
- name: Update results
Expand All @@ -182,3 +172,14 @@ jobs:
- name: Kick
if: contains(fromJSON('["schedule", "workflow_dispatch"]'), github.event_name)
run: git push

merge-artifacts:
needs: archiver
runs-on: ubuntu-latest
steps:
- name: Download 📥
uses: actions/upload-artifact/merge@v4
with:
name: project-${{ github.sha }}-${{ strategy.job-index }}
pattern: project-${{ github.sha }}-*
delete-merged: true

0 comments on commit cf59473

Please sign in to comment.