Skip to content

Commit

Permalink
test actions fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jackieli-tes committed Jan 9, 2025
1 parent fa77d83 commit e8140e5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 47 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/test-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,7 @@ on:
branches: [main]

jobs:
create-minio-bucket:
runs-on: ubuntu-latest
steps:
- run: |
wget -q https://dl.min.io/client/mc/release/linux-amd64/mc
chmod a+x mc
./mc mb play/actions-cache || exit 0
test-save:
needs: create-minio-bucket
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
Expand All @@ -34,13 +25,13 @@ jobs:
- name: Save cache
uses: ./
env:
AWS_ACCESS_KEY_ID: "Q3AM3UQ867SPQQA43P2F"
AWS_SECRET_ACCESS_KEY: "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_KEY }}
# AWS_SESSION_TOKEN: "xxx"
AWS_REGION: "us-east-1"
with:
endpoint: play.min.io
bucket: actions-cache
endpoint: ${{ secrets.ENDPOINT }}
bucket: ${{ secrets.BUCKET }}
use-fallback: false
key: test-${{ runner.os }}-${{ github.run_id }}
path: |
Expand All @@ -60,13 +51,13 @@ jobs:
- name: Restore cache
uses: ./
env:
AWS_ACCESS_KEY_ID: "Q3AM3UQ867SPQQA43P2F"
AWS_SECRET_ACCESS_KEY: "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_KEY }}
# AWS_SESSION_TOKEN: "xxx"
AWS_REGION: "us-east-1"
with:
endpoint: play.min.io
bucket: actions-cache
endpoint: ${{ secrets.ENDPOINT }}
bucket: ${{ secrets.BUCKET }}
key: test-${{ runner.os }}-${{ github.run_id }}
path: |
test-cache
Expand Down
50 changes: 20 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,7 @@ jobs:
exit 1
fi
create-minio-bucket:
runs-on: ubuntu-latest
steps:
- run: |
wget -q https://dl.min.io/client/mc/release/linux-amd64/mc
chmod a+x mc
./mc mb play/actions-cache || exit 0
test-save:
needs: create-minio-bucket
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
Expand All @@ -72,10 +63,10 @@ jobs:
- name: Save cache
uses: ./
with:
endpoint: play.min.io
accessKey: "Q3AM3UQ867SPQQA43P2F"
secretKey: "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
bucket: actions-cache
endpoint: ${{ secrets.ENDPOINT }}
accessKey: ${{ secrets.ACCESS_KEY }}
secretKey: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.BUCKET }}
use-fallback: false
key: test-${{ runner.os }}-${{ github.run_id }}
path: |
Expand All @@ -95,10 +86,10 @@ jobs:
- name: Restore cache
uses: ./
with:
endpoint: play.min.io
accessKey: "Q3AM3UQ867SPQQA43P2F"
secretKey: "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
bucket: actions-cache
endpoint: ${{ secrets.ENDPOINT }}
accessKey: ${{ secrets.ACCESS_KEY }}
secretKey: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.BUCKET }}
use-fallback: false
key: test-${{ runner.os }}-${{ github.run_id }}
path: |
Expand All @@ -124,10 +115,10 @@ jobs:
- name: Restore cache
uses: ./
with:
endpoint: play.min.io
accessKey: "Q3AM3UQ867SPQQA43P2F"
secretKey: "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
bucket: actions-cache
endpoint: ${{ secrets.ENDPOINT }}
accessKey: ${{ secrets.ACCESS_KEY }}
secretKey: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.BUCKET }}
use-fallback: false
key: test-${{ runner.os }}-${{ github.run_id }}-${{ github.sha }}
path: |
Expand All @@ -142,7 +133,6 @@ jobs:
run: src/verify-cache-files.sh ${{ runner.os }} ~/test-cache

test-save-only:
needs: create-minio-bucket
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
Expand All @@ -160,10 +150,10 @@ jobs:
- name: Save cache
uses: ./save/
with:
endpoint: play.min.io
accessKey: "Q3AM3UQ867SPQQA43P2F"
secretKey: "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
bucket: actions-cache
endpoint: ${{ secrets.ENDPOINT }}
accessKey: ${{ secrets.ACCESS_KEY }}
secretKey: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.BUCKET }}
use-fallback: false
key: test-save-only-${{ runner.os }}-${{ github.run_id }}
path: |
Expand All @@ -183,10 +173,10 @@ jobs:
- name: Restore cache
uses: ./restore/
with:
endpoint: play.min.io
accessKey: "Q3AM3UQ867SPQQA43P2F"
secretKey: "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
bucket: actions-cache
endpoint: ${{ secrets.ENDPOINT }}
accessKey: ${{ secrets.ACCESS_KEY }}
secretKey: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.BUCKET }}
use-fallback: false
key: test-save-only-${{ runner.os }}-${{ github.run_id }}
path: |
Expand Down

0 comments on commit e8140e5

Please sign in to comment.