From c157e416e58458278c9597cc45e8df1b2e85db70 Mon Sep 17 00:00:00 2001 From: JooYoung Park Date: Mon, 22 Apr 2024 17:44:28 +0800 Subject: [PATCH] cache: true Signed-off-by: JooYoung Park --- .github/workflows/build_setup.yml | 6 ++++-- .github/workflows/cri_minio_test.yml | 6 ++++-- .../workflows/cri_stock_containerd_test.yml | 6 ++++-- .github/workflows/cri_tests.yml | 6 ++++-- .github/workflows/integration_tests.yml | 6 ++++-- .github/workflows/nightly_tests.yml | 12 ++++++++---- .github/workflows/openyurt-unit-test.yml | 6 ++++-- .github/workflows/stargz_tests.yml | 6 ++++-- .github/workflows/unit_tests.yml | 18 ++++++++++++------ 9 files changed, 48 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build_setup.yml b/.github/workflows/build_setup.yml index 1601073d2..371ac5667 100644 --- a/.github/workflows/build_setup.yml +++ b/.github/workflows/build_setup.yml @@ -22,10 +22,12 @@ jobs: name: Build setup scripts runs-on: ubuntu-20.04 steps: - - name: Set up Go 1.21 + - name: Set up Go version in go.mod file uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version-file: ${{ github.workspace }}/go.mod + cache-dependency-path: ${{ github.workspace }}/go.sum + - name: Check out the code uses: actions/checkout@v4 diff --git a/.github/workflows/cri_minio_test.yml b/.github/workflows/cri_minio_test.yml index e8ab7f199..e3eb85a66 100644 --- a/.github/workflows/cri_minio_test.yml +++ b/.github/workflows/cri_minio_test.yml @@ -34,10 +34,12 @@ jobs: - name: Setup TMPDIR run: mkdir -p $TMPDIR - - name: Set up Go 1.21 + - name: Set up Go version in go.mod file uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version-file: ${{ github.workspace }}/go.mod + cache-dependency-path: ${{ github.workspace }}/go.sum + - name: Check out code into the Go module directory uses: actions/checkout@v4 diff --git a/.github/workflows/cri_stock_containerd_test.yml b/.github/workflows/cri_stock_containerd_test.yml index 2dc5c3d9c..3e93fd3e6 100644 --- a/.github/workflows/cri_stock_containerd_test.yml +++ b/.github/workflows/cri_stock_containerd_test.yml @@ -23,10 +23,12 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v4 - - name: Set up golang + - name: Set up Go version in go.mod file uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version-file: ${{ github.workspace }}/go.mod + cache-dependency-path: ${{ github.workspace }}/go.sum + - name: Build setup scripts run: pushd scripts && go build -o setup_tool && popd diff --git a/.github/workflows/cri_tests.yml b/.github/workflows/cri_tests.yml index aadf88bd6..3fcb18df0 100644 --- a/.github/workflows/cri_tests.yml +++ b/.github/workflows/cri_tests.yml @@ -27,10 +27,12 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up golang + - name: Set up Go version in go.mod file uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version-file: ${{ github.workspace }}/go.mod + cache-dependency-path: ${{ github.workspace }}/go.sum + - name: Add rsync run: | diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 2bfcd88e4..d20bf9a03 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -31,10 +31,12 @@ jobs: test-name: [test, test-man-bench] steps: - - name: Set up Go 1.21 + - name: Set up Go version in go.mod file uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version-file: ${{ github.workspace }}/go.mod + cache-dependency-path: ${{ github.workspace }}/go.sum + - name: Set up Python 3.x uses: actions/setup-python@v5 diff --git a/.github/workflows/nightly_tests.yml b/.github/workflows/nightly_tests.yml index 7707a2b72..38e91bd12 100644 --- a/.github/workflows/nightly_tests.yml +++ b/.github/workflows/nightly_tests.yml @@ -20,10 +20,12 @@ jobs: - name: Setup TMPDIR run: mkdir -p $TMPDIR - - name: Set up Go 1.21 + - name: Set up Go version in go.mod file uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version-file: ${{ github.workspace }}/go.mod + cache-dependency-path: ${{ github.workspace }}/go.sum + - name: Upgrade git run: | @@ -77,10 +79,12 @@ jobs: - name: Setup TMPDIR run: mkdir -p $TMPDIR - - name: Set up Go 1.21 + - name: Set up Go version in go.mod file uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version-file: ${{ github.workspace }}/go.mod + cache-dependency-path: ${{ github.workspace }}/go.sum + - name: Check out code into the Go module directory uses: actions/checkout@v4 diff --git a/.github/workflows/openyurt-unit-test.yml b/.github/workflows/openyurt-unit-test.yml index f3187e7fa..d746661e7 100644 --- a/.github/workflows/openyurt-unit-test.yml +++ b/.github/workflows/openyurt-unit-test.yml @@ -22,10 +22,12 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.21 + - name: Set up Go version in go.mod file uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version-file: ${{ github.workspace }}/go.mod + cache-dependency-path: ${{ github.workspace }}/go.sum + - name: Check out the code uses: actions/checkout@v4 diff --git a/.github/workflows/stargz_tests.yml b/.github/workflows/stargz_tests.yml index 2ad8519e2..94a2cadc0 100644 --- a/.github/workflows/stargz_tests.yml +++ b/.github/workflows/stargz_tests.yml @@ -42,10 +42,12 @@ jobs: - name: Checkout LFS objects run: git lfs checkout - - name: Set up Go 1.21 + - name: Set up Go version in go.mod file uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version-file: ${{ github.workspace }}/go.mod + cache-dependency-path: ${{ github.workspace }}/go.sum + - name: Build setup scripts run: pushd scripts && go build -o setup_tool && popd diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 8cd9def45..031ffb789 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -29,10 +29,12 @@ jobs: module: [misc, networking, snapshotting] steps: - - name: Set up Go 1.21 + - name: Set up Go version in go.mod file uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version-file: ${{ github.workspace }}/go.mod + cache-dependency-path: ${{ github.workspace }}/go.sum + - name: Set up Python 3.x uses: actions/setup-python@v5 @@ -74,10 +76,12 @@ jobs: module: [profile] steps: - - name: Set up Go 1.21 + - name: Set up Go version in go.mod file uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version-file: ${{ github.workspace }}/go.mod + cache-dependency-path: ${{ github.workspace }}/go.sum + - name: Set up Python 3.x uses: actions/setup-python@v5 @@ -122,10 +126,12 @@ jobs: module: [ ctriface, ctriface/image, devmapper ] steps: - - name: Set up Go 1.21 + - name: Set up Go version in go.mod file uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version-file: ${{ github.workspace }}/go.mod + cache-dependency-path: ${{ github.workspace }}/go.sum + - name: Upgrade git run: |