3333 event : ['${{ github.event_name }}']
3434 node : ['20', '22', '24']
3535 os : ['macos-15', 'ubuntu-24.04', 'windows-2025']
36+
37+ include :
38+ # Only generate annotations once.
39+ - node : ' 24'
40+ os : ' ubuntu-24.04'
41+ annotations : true
3642 exclude :
3743 # On PRs: Only test Node 20 on Ubuntu and Windows
3844 - event : ' pull_request'
@@ -47,14 +53,15 @@ jobs:
4753 persist-credentials : false
4854
4955 - name : Use desired version of Node.js
50- uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2 .0
56+ uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3 .0
5157 with :
5258 node-version : ${{ matrix.node }}
59+ cache : npm
5360
5461 - name : Pin npm version for consistency
5562 run : npm install -g npm@10
5663
57- - name : Npm install
64+ - name : npm install
5865 # A "full" install is executed, since `npm ci` does not always exit
5966 # with an error status code if the lock file is inaccurate. This also
6067 # helps to catch dependencies not being installed with exact version.
6370 # See: https://github.com/WordPress/gutenberg/pull/39865
6471 run : npm install
6572
66- - name : Lint JavaScript and Styles
67- run : npm run lint
73+ - name : Lint package.json files
74+ run : npm run lint:pkg-json
75+
76+ - name : Lint package-lock.json file
77+ run : npm run lint:lockfile
78+
79+ - name : Validate TypeScript config
80+ run : npm run lint:tsconfig
81+
82+ - name : Lint JavaScript
83+ if : ${{ matrix.annotations }}
84+ run : npm run lint:js -- --format compact
85+
86+ - name : Lint Styles
87+ if : ${{ matrix.annotations }}
88+ run : npm run lint:css -- --formatter compact
6889
6990 - name : Type checking
7091 run : npm run build
0 commit comments