From fef17291d9b0e07a89dbd25a3c6accd6d603ca62 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 19 Apr 2024 05:29:08 +0200 Subject: [PATCH 1/2] Enable npm cache on `setup-node` action (#30577) Enable npm dependency cache in [setup-node](https://github.com/actions/setup-node). This should work reliably and across branches as well. --- .github/workflows/pull-compliance.yml | 6 ++++++ .github/workflows/pull-e2e-tests.yml | 2 ++ .github/workflows/release-nightly.yml | 2 ++ .github/workflows/release-tag-rc.yml | 2 ++ .github/workflows/release-tag-version.yml | 2 ++ 5 files changed, 14 insertions(+) diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index c15983661bf97..7fe603267876f 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -61,6 +61,8 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 20 + cache: npm + cache-dependency-path: package-lock.json - run: make deps-frontend - run: make lint-swagger @@ -130,6 +132,8 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 20 + cache: npm + cache-dependency-path: package-lock.json - run: make deps-frontend - run: make lint-frontend - run: make checks-frontend @@ -177,6 +181,8 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 20 + cache: npm + cache-dependency-path: package-lock.json - run: make deps-frontend - run: make lint-md - run: make docs diff --git a/.github/workflows/pull-e2e-tests.yml b/.github/workflows/pull-e2e-tests.yml index 3fca2bee80bd6..a641f91ba24e4 100644 --- a/.github/workflows/pull-e2e-tests.yml +++ b/.github/workflows/pull-e2e-tests.yml @@ -24,6 +24,8 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 20 + cache: npm + cache-dependency-path: package-lock.json - run: make deps-frontend frontend deps-backend - run: npx playwright install --with-deps - run: make test-e2e-sqlite diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index d12b14572f30e..6442299b841a6 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -23,6 +23,8 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 20 + cache: npm + cache-dependency-path: package-lock.json - run: make deps-frontend deps-backend # xgo build - run: make release diff --git a/.github/workflows/release-tag-rc.yml b/.github/workflows/release-tag-rc.yml index c6472073e4164..a3a3a5e9341cc 100644 --- a/.github/workflows/release-tag-rc.yml +++ b/.github/workflows/release-tag-rc.yml @@ -24,6 +24,8 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 20 + cache: npm + cache-dependency-path: package-lock.json - run: make deps-frontend deps-backend # xgo build - run: make release diff --git a/.github/workflows/release-tag-version.yml b/.github/workflows/release-tag-version.yml index a18af78a10886..6c5f3755df339 100644 --- a/.github/workflows/release-tag-version.yml +++ b/.github/workflows/release-tag-version.yml @@ -26,6 +26,8 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 20 + cache: npm + cache-dependency-path: package-lock.json - run: make deps-frontend deps-backend # xgo build - run: make release From 470b52625962213ddfec5a649f9ae7bb7c5da62c Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 19 Apr 2024 12:12:19 +0800 Subject: [PATCH 2/2] Upgrade setup-node to v4 --- .github/workflows/pull-compliance.yml | 6 +++--- .github/workflows/pull-e2e-tests.yml | 2 +- .github/workflows/release-nightly.yml | 2 +- .github/workflows/release-tag-rc.yml | 2 +- .github/workflows/release-tag-version.yml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index 7fe603267876f..c2ff5813b21c6 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -58,7 +58,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 20 cache: npm @@ -129,7 +129,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 20 cache: npm @@ -178,7 +178,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 20 cache: npm diff --git a/.github/workflows/pull-e2e-tests.yml b/.github/workflows/pull-e2e-tests.yml index a641f91ba24e4..28c3763df4eb5 100644 --- a/.github/workflows/pull-e2e-tests.yml +++ b/.github/workflows/pull-e2e-tests.yml @@ -21,7 +21,7 @@ jobs: with: go-version: "~1.21" check-latest: true - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 20 cache: npm diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index 6442299b841a6..ad3213b712099 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -20,7 +20,7 @@ jobs: with: go-version: "~1.21" check-latest: true - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 20 cache: npm diff --git a/.github/workflows/release-tag-rc.yml b/.github/workflows/release-tag-rc.yml index a3a3a5e9341cc..034ef6913b164 100644 --- a/.github/workflows/release-tag-rc.yml +++ b/.github/workflows/release-tag-rc.yml @@ -21,7 +21,7 @@ jobs: with: go-version: "~1.21" check-latest: true - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 20 cache: npm diff --git a/.github/workflows/release-tag-version.yml b/.github/workflows/release-tag-version.yml index 6c5f3755df339..a5879d64f3f31 100644 --- a/.github/workflows/release-tag-version.yml +++ b/.github/workflows/release-tag-version.yml @@ -23,7 +23,7 @@ jobs: with: go-version: "~1.21" check-latest: true - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 20 cache: npm