From 49e03131f65db6e4c7922934858dc2fd70291e7c Mon Sep 17 00:00:00 2001 From: husharp Date: Sat, 14 Sep 2024 10:37:21 +0800 Subject: [PATCH] upgrade action Signed-off-by: husharp --- .github/workflows/check.yaml | 16 +++---------- .github/workflows/label.yaml | 2 +- .github/workflows/pd-docker-image.yaml | 6 ++--- .github/workflows/pd-tests.yaml | 26 +++++++-------------- .github/workflows/tso-consistency-test.yaml | 8 +++---- .github/workflows/tso-function-test.yaml | 8 +++---- 6 files changed, 24 insertions(+), 42 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 9d84675b7be..078fc2bc09c 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -8,21 +8,11 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/setup-go@v3 - with: - go-version: 1.20.1 - name: Checkout code - uses: actions/checkout@v3 - - name: Restore cache - uses: actions/cache@v3 + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - **/.dashboard_download_cache - key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-golang + go-version: 1.20.1 - name: Make Check run: | SWAGGER=1 make build diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml index 5ff2b895528..00438d26b63 100644 --- a/.github/workflows/label.yaml +++ b/.github/workflows/label.yaml @@ -7,7 +7,7 @@ jobs: add_labels: runs-on: ubuntu-latest steps: - - uses: actions/github-script@v4 + - uses: actions/github-script@v7 name: Add labels with: script: | diff --git a/.github/workflows/pd-docker-image.yaml b/.github/workflows/pd-docker-image.yaml index c1e35a28160..5d803571f46 100644 --- a/.github/workflows/pd-docker-image.yaml +++ b/.github/workflows/pd-docker-image.yaml @@ -15,10 +15,10 @@ jobs: strategy: fail-fast: true steps: - - uses: actions/setup-go@v3 + - name: Checkout code + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: 1.20.1 - - name: Checkout code - uses: actions/checkout@v3 - name: Make run: make docker-image diff --git a/.github/workflows/pd-tests.yaml b/.github/workflows/pd-tests.yaml index 83d4651ca3a..66842757307 100644 --- a/.github/workflows/pd-tests.yaml +++ b/.github/workflows/pd-tests.yaml @@ -27,20 +27,11 @@ jobs: outputs: job-total: 10 steps: - - uses: actions/setup-go@v3 - with: - go-version: "1.20.1" - name: Checkout code - uses: actions/checkout@v3 - - name: Restore cache - uses: actions/cache@v3 + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - **/.tools - **/.dashboard_download_cache - key: ${{ runner.os }}-go-${{ matrix.worker_id }}-${{ hashFiles('**/go.sum') }} + go-version: 1.20.1 - name: Make Test env: WORKER_ID: ${{ matrix.worker_id }} @@ -50,20 +41,21 @@ jobs: mv covprofile covprofile_$WORKER_ID sed -i "/failpoint_binding/d" covprofile_$WORKER_ID - name: Upload coverage result ${{ matrix.worker_id }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: cover-reports + name: cover-reports-${{ matrix.worker_id }} path: covprofile_${{ matrix.worker_id }} report-coverage: needs: chunks runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download chunk report - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: - name: cover-reports + pattern: cover-reports-* + merge-multiple: true - name: Merge env: TOTAL_JOBS: ${{needs.chunks.outputs.job-total}} diff --git a/.github/workflows/tso-consistency-test.yaml b/.github/workflows/tso-consistency-test.yaml index 06fe453821e..a949b5ce204 100644 --- a/.github/workflows/tso-consistency-test.yaml +++ b/.github/workflows/tso-consistency-test.yaml @@ -8,10 +8,10 @@ jobs: tso-consistency-test: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 - with: - go-version: "1.20.1" - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: 1.20.1 - name: Make TSO Consistency Test run: make test-tso-consistency diff --git a/.github/workflows/tso-function-test.yaml b/.github/workflows/tso-function-test.yaml index 7c988e465ee..49c79f64d7c 100644 --- a/.github/workflows/tso-function-test.yaml +++ b/.github/workflows/tso-function-test.yaml @@ -19,10 +19,10 @@ jobs: tso-function-test: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 - with: - go-version: "1.20.1" - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: 1.20.1 - name: Make TSO Function Test run: make test-tso-function