Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
source_up
use node v16
use node 20.19.4
61 changes: 61 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,67 @@ jobs:
shell: bash
run: src/verify-cache-files.sh ${{ runner.os }} ~/test-cache

test-save-retry:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate files in working directory
shell: bash
run: src/create-cache-files.sh ${{ runner.os }} test-cache
- name: Generate files outside working directory
shell: bash
run: src/create-cache-files.sh ${{ runner.os }} ~/test-cache
- name: Save cache with retry enabled
uses: ./
with:
endpoint: ${{ secrets.ENDPOINT }}
accessKey: ${{ secrets.ACCESS_KEY }}
secretKey: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.BUCKET }}
use-fallback: false
key: test-retry-${{ runner.os }}-${{ github.run_id }}
path: |
test-cache
~/test-cache
retry: true
retry-count: 3

test-restore-retry:
needs: test-save-retry
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore cache with retry enabled
uses: ./
with:
endpoint: ${{ secrets.ENDPOINT }}
accessKey: ${{ secrets.ACCESS_KEY }}
secretKey: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.BUCKET }}
use-fallback: false
key: test-retry-${{ runner.os }}-${{ github.run_id }}
path: |
test-cache
~/test-cache
retry: true
retry-count: 3
- name: Verify cache files in working directory
shell: bash
run: src/verify-cache-files.sh ${{ runner.os }} test-cache
- name: Verify cache files outside working directory
shell: bash
run: src/verify-cache-files.sh ${{ runner.os }} ~/test-cache

test-save-only:
strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
sessionToken: "AQoDYXdzEJraDcqRtz123" # optional
bucket: actions-cache # required
use-fallback: true # optional, use github actions cache fallback, default true
retry: true # optional, enable retry on failure s3 operations, default false

# actions/cache compatible properties: https://github.com/actions/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ inputs:
description: "Check if a restore is successfull but dont download/extract cache."
required: false
default: "false"
retry:
description: "Enable retry on failure for S3 operations"
required: false
default: "false"
retry-count:
description: "Number of times to retry the minio operation in case of failure"
required: false
default: "3"
# zip-option:
# description: zip options
# required: false
Expand Down
Loading
Loading