From e8140e50824f2b43b51b56c081213386421bf8ff Mon Sep 17 00:00:00 2001 From: Jackie Li Date: Thu, 9 Jan 2025 11:15:56 +0000 Subject: [PATCH] test actions fix --- .github/workflows/test-env.yaml | 25 ++++++----------- .github/workflows/test.yml | 50 +++++++++++++-------------------- 2 files changed, 28 insertions(+), 47 deletions(-) diff --git a/.github/workflows/test-env.yaml b/.github/workflows/test-env.yaml index f545de2..2b09bfc 100644 --- a/.github/workflows/test-env.yaml +++ b/.github/workflows/test-env.yaml @@ -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] @@ -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: | @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a71c1f5..7aee9e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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] @@ -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: | @@ -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: | @@ -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: | @@ -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 ] @@ -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: | @@ -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: |