-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [ci] Speed up site lint job * fix * also speed up analyze
- Loading branch information
Showing
2 changed files
with
28 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,18 +11,26 @@ jobs: | |
analyze: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
|
||
- name: Install dependencies | ||
uses: bahmutov/[email protected] | ||
- name: Restore cached node_modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: "**/node_modules" | ||
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | ||
|
||
- name: Install deps | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Restore next build | ||
uses: actions/cache@v3 | ||
uses: actions/cache@v4 | ||
id: restore-build-cache | ||
env: | ||
cache-name: cache-next-build | ||
|
@@ -41,7 +49,7 @@ jobs: | |
run: npx -p [email protected] report | ||
|
||
- name: Upload bundle | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: .next/analyze/__bundle_analysis.json | ||
name: bundle_analysis.json | ||
|
@@ -73,7 +81,7 @@ jobs: | |
run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare | ||
|
||
- name: Upload analysis comment | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: analysis_comment.txt | ||
path: .next/analyze/__bundle_analysis_comment.txt | ||
|
@@ -82,7 +90,7 @@ jobs: | |
run: echo ${{ github.event.number }} > ./pr_number | ||
|
||
- name: Upload PR number | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pr_number | ||
path: ./pr_number | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,14 +14,22 @@ jobs: | |
name: Lint on node 20.x and ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js 20.x | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
|
||
- name: Install deps and build (with cache) | ||
uses: bahmutov/[email protected] | ||
- name: Restore cached node_modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: "**/node_modules" | ||
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | ||
|
||
- name: Install deps | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Lint codebase | ||
run: yarn ci-check |