Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dependencies and update CI #320

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
32 changes: 8 additions & 24 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "04:00"
pull-request-branch-name:
separator: "-"
open-pull-requests-limit: 10
ignore:
- dependency-name: filesize
versions:
- 6.2.6
- 6.3.0
- dependency-name: adm-zip
versions:
- 0.5.3
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "04:00"
pull-request-branch-name:
separator: "-"
open-pull-requests-limit: 10
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
252 changes: 37 additions & 215 deletions .github/workflows/download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,235 +5,57 @@ on:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
wait:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Wait
run: sleep 60
download-latest:
runs-on: ubuntu-latest
needs: wait
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
uses: ./
with:
workflow: upload.yml
name: artifact
path: artifact
- name: Test
run: cat artifact/sha | grep $GITHUB_SHA
download-search-workflow:
runs-on: ubuntu-latest
needs: wait
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
uses: ./
with:
name: artifact
path: artifact
workflow_search: true
- name: Test
run: cat artifact/sha | grep $GITHUB_SHA
download-branch:
runs-on: ubuntu-latest
needs: wait
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
uses: ./
with:
workflow: upload.yml
name: artifact
path: artifact
branch: master
- name: Test
run: cat artifact/sha | grep $GITHUB_SHA
download-pr:
runs-on: ubuntu-latest
needs: wait
if: github.ref != 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
uses: ./
with:
workflow: upload.yml
name: artifact
path: artifact
pr: ${{github.event.pull_request.number}}
- name: Test
run: cat artifact/sha | grep $GITHUB_SHA
download-commit:
runs-on: ubuntu-latest
needs: wait
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
uses: ./
with:
workflow: upload.yml
name: artifact
path: artifact
commit: ${{ github.event.workflow_run.head_sha }}
- name: Test
run: cat artifact/sha | grep $GITHUB_SHA
download-multiple:
runs-on: ubuntu-latest
needs: wait
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
uses: ./
with:
workflow: upload.yml
- name: Test
run: |
cat artifact/sha | grep $GITHUB_SHA
cat artifact1/sha1 | grep $GITHUB_SHA
cat artifact2/sha2 | grep $GITHUB_SHA
download-regexp:
runs-on: ubuntu-latest
needs: wait
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
uses: ./
with:
workflow: upload.yml
name: artifact.
name_is_regexp: true
- name: Test
run: |
cat artifact1/sha1 | grep $GITHUB_SHA
cat artifact2/sha2 | grep $GITHUB_SHA
! test -d artifact/artifact
! test -f artifact.zip
download-empty-conclusion:
runs-on: ubuntu-latest
needs: wait
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
uses: ./
with:
workflow: upload.yml
name: artifact
path: artifact
workflow_conclusion:
- name: Test
run: cat artifact/sha | grep $GITHUB_SHA
download-skip-unpack:
runs-on: ubuntu-latest
needs: wait
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
uses: ./
with:
workflow: upload.yml
name: artifact
path: artifact
skip_unpack: true
- name: Test
run: |
test -d artifact
test -f artifact/artifact.zip
! test -d artifact/artifact
! test -f artifact.zip
unzip -l artifact/artifact.zip
download-dry-run-exists:
runs-on: ubuntu-latest
needs: wait
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
id: download
uses: ./
with:
workflow: upload.yml
name: artifact
path: artifact
dry_run: true
- name: Test
run: test ${{ steps.download.outputs.dry_run }} == true
download-dry-run-not-exists:
runs-on: ubuntu-latest
needs: wait
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
id: download
uses: ./
with:
workflow: upload.yml
name: not-artifact
path: artifact
dry_run: true
- name: Test
run: test ${{ steps.download.outputs.dry_run }} == false
download-with-check-artifacts:
runs-on: ubuntu-latest
needs: wait
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
uses: ./
with:
workflow: upload.yml
name: artifact
path: artifact
check_artifacts: true
- name: Test
run: cat artifact/sha | grep $GITHUB_SHA
download-with-search-artifacts:
runs-on: ubuntu-latest

download:
runs-on: ubuntu-24.04
needs: wait
strategy:
matrix:
type: [latest, search-workflow, branch, pr, commit, multiple, regexp, empty-conclusion, skip-unpack, dry-run-exists, dry-run-not-exists, with-check-artifacts, with-search-artifacts, regexp-with-search-artifacts]
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4

- name: Download
uses: ./
with:
workflow: upload.yml
name: artifact
path: artifact
search_artifacts: true
- name: Test
run: cat artifact/sha | grep $GITHUB_SHA
download-regexp-with-search-artifacts:
runs-on: ubuntu-latest
needs: wait
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download
uses: ./
with:
workflow: upload.yml
name: artifact.
name_is_regexp: true
path: artifact
search_artifacts: true
type: ${{ matrix.type }}
branch: ${{ matrix.type == 'branch' && 'master' || '' }}
pr: ${{ matrix.type == 'pr' && github.event.pull_request.number || '' }}
commit: ${{ matrix.type == 'commit' && github.event.workflow_run.head_sha || '' }}
workflow_conclusion: ${{ matrix.type == 'empty-conclusion' && '' || null }}
skip_unpack: ${{ matrix.type == 'skip-unpack' && 'true' || null }}
dry_run: ${{ matrix.type == 'dry-run-exists' && 'true' || matrix.type == 'dry-run-not-exists' && 'true' || null }}
search_artifacts: ${{ matrix.type == 'with-search-artifacts' || matrix.type == 'regexp-with-search-artifacts' && 'true' || null }}
name_is_regexp: ${{ matrix.type == 'regexp' || matrix.type == 'regexp-with-search-artifacts' && 'true' || null }}
check_artifacts: ${{ matrix.type == 'with-check-artifacts' && 'true' || null }}

- name: Test
run: |
cat artifact/artifact1/sha1 | grep $GITHUB_SHA
cat artifact/artifact2/sha2 | grep $GITHUB_SHA
! test -d artifact/artifact/artifact
! test -f artifact/artifact.zip
if [[ "${{ matrix.type }}" == "multiple" ]]; then
cat artifact/sha | grep $GITHUB_SHA
cat artifact1/sha1 | grep $GITHUB_SHA
cat artifact2/sha2 | grep $GITHUB_SHA
elif [[ "${{ matrix.type }}" == "regexp" || "${{ matrix.type }}" == "regexp-with-search-artifacts" ]]; then
cat artifact/artifact1/sha1 | grep $GITHUB_SHA
cat artifact/artifact2/sha2 | grep $GITHUB_SHA
! test -d artifact/artifact/artifact
! test -f artifact/artifact.zip
elif [[ "${{ matrix.type }}" == "dry-run-exists" ]]; then
test ${{ steps.download.outputs.dry_run }} == true
elif [[ "${{ matrix.type }}" == "dry-run-not-exists" ]]; then
test ${{ steps.download.outputs.dry_run }} == false
else
cat artifact/sha | grep $GITHUB_SHA
fi
28 changes: 16 additions & 12 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,39 @@ on:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
upload:
runs-on: ubuntu-latest

steps:
- name: Dump
run: |
mkdir artifact
echo $GITHUB_SHA > artifact/sha
- name: Upload

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: artifact
path: artifact

upload-multiple:
runs-on: ubuntu-latest

strategy:
matrix:
artifact: [artifact1, artifact2]
sha: [sha1, sha2]
steps:
- name: Dump
run: |
mkdir artifact1 artifact2
echo $GITHUB_SHA > artifact1/sha1
echo $GITHUB_SHA > artifact2/sha2
- name: Upload first
uses: actions/upload-artifact@v4
with:
name: artifact1
path: artifact1
- name: Upload second
mkdir ${{ matrix.artifact }}
echo $GITHUB_SHA > ${{ matrix.artifact }}/${{ matrix.sha }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: artifact2
path: artifact2
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
Loading