File tree Expand file tree Collapse file tree 10 files changed +112
-20
lines changed
Expand file tree Collapse file tree 10 files changed +112
-20
lines changed Original file line number Diff line number Diff line change 1+ name : ' Cache restoration'
2+ description : ' Setup a NodeJS environment and restore cache if any, given a node version'
3+
4+ inputs :
5+ node-version :
6+ description : ' Node version to use, default to LTS'
7+ required : true
8+ default : 22
9+ outputs :
10+ cache-hit :
11+ description : ' Forward actions/cache cache-hit output'
12+ value : ${{ steps.node-cache.outputs.cache-hit }}
13+
14+ runs :
15+ using : ' composite' # Mandatory parameter
16+ steps :
17+ # Setup a Node environment given a node version
18+ - name : Use Node.js ${{ inputs.node-version }}
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : ${{ inputs.node-version }}
22+
23+ - name : Cache Node Modules
24+ id : node-cache
25+ uses : actions/cache@v4
26+ with :
27+ path : |
28+ **/node_modules
29+ ~/.cache
30+ key : ${{ runner.os }}-${{ inputs.node-version }}-${{ hashFiles('package-lock.json') }}
Original file line number Diff line number Diff line change 1+ name : Package Code Quality
2+
3+ on :
4+ pull_request :
5+ branches : [canary]
6+ paths-ignore :
7+ - ' **/*.md'
8+ - ' **/*.php'
9+
10+ concurrency :
11+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+ cancel-in-progress : true
13+
14+ jobs :
15+ setup-node :
16+ name : Setup Dependencies
17+ uses : ./.github/workflows/node-setup.yml
18+ strategy :
19+ matrix :
20+ node-version : [22]
21+ with :
22+ node-version : ${{ matrix.node-version }}
23+ check_lint :
24+ name : Validate package linting
25+ runs-on : ubuntu-latest
26+ needs : [setup-node]
27+ steps :
28+ - name : Checkout repo
29+ uses : actions/checkout@v4
30+ - name : Set up Node.js
31+ uses : ./.github/actions/cache-restore
32+ - name : Check Linting
33+ run : npm run lint
34+ check_format :
35+ name : Validate package formatting
36+ runs-on : ubuntu-latest
37+ needs : [setup-node]
38+ steps :
39+ - name : Checkout repo
40+ uses : actions/checkout@v4
41+ - name : Set up Node.js
42+ uses : ./.github/actions/cache-restore
43+ - name : Check Formatting
44+ run : npm run test:format
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 55 paths-ignore :
66 - ' **/*.md'
77
8+ concurrency :
9+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+ cancel-in-progress : true
11+
812jobs :
913 lint_plugin :
1014 runs-on : ubuntu-22.04
Original file line number Diff line number Diff line change 1+ name : ' Node Workspace Setup'
2+ description : ' Setup a environment and restore cache if any, given a node version'
3+
4+ on :
5+ workflow_call :
6+ inputs :
7+ node-version :
8+ description : ' Node version to use, default to LTS'
9+ required : true
10+ type : string
11+ default : ' 22'
12+
13+ jobs :
14+ setup :
15+ name : Setup Dependencies
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Checkout Repository
19+ uses : actions/checkout@v4
20+
21+ - name : Set up Node.js ${{ inputs.node-version }}
22+ uses : ./.github/actions/cache-restore
23+ id : cache-node-modules
24+ with :
25+ node-version : ${{ inputs.node-version }}
26+
27+ - name : Install dependencies
28+ if : steps.cache-node-modules.outputs.cache-hit != 'true'
29+ run : npm ci
Original file line number Diff line number Diff line change 1212
1313jobs :
1414 release_plugin :
15- runs-on : ubuntu-22.04
15+ runs-on : ubuntu-latest
1616 steps :
1717 - name : Discord Notification
1818 env :
Original file line number Diff line number Diff line change 2828 "dev:next:getting-started" : " rimraf examples/next/faustwp-getting-started/.next && npm run dev ---workspace=examples/next/faustwp-getting-started" ,
2929 "test" : " npm run build && npm test --workspace=@faustwp/core --workspace=@faustwp/cli --workspace=@faustwp/blocks --workspace=@faustwp/block-editor-utils" ,
3030 "test:coverage" : " npm run build && npm run test:coverage --workspace=@faustwp/block-editor-utils" ,
31+ "test:format" : " npm run test:format --workspace=@faustwp/cli --workspace=@faustwp/core --workspace=@faustwp/block-editor-utils" ,
3132 "wpe-build" : " exit 1" ,
3233 "changeset" : " changeset" ,
3334 "version" : " changeset version && node scripts/versionPlugin.js" ,
Original file line number Diff line number Diff line change 3838 "clean" : " rimraf dist" ,
3939 "package" : " node ../../scripts/package.js" ,
4040 "test" : " " ,
41+ "test:format" : " prettier . --check" ,
4142 "build" : " npm run build-esm && npm run build-cjs" ,
4243 "build-esm" : " tsc -p ." ,
4344 "build-cjs" : " tsc -p tsconfig.cjs.json" ,
Original file line number Diff line number Diff line change 4242 "test" : " jest" ,
4343 "test:coverage:ci" : " jest --ci --json --coverage --testLocationInResults --passWithNoTests --outputFile=report.json" ,
4444 "test:coverage" : " jest --coverage" ,
45+ "test:format" : " prettier . --check" ,
4546 "test:watch" : " jest --watch"
4647 },
4748 "repository" : {
Original file line number Diff line number Diff line change 6262 "prepublish" : " npm run build" ,
6363 "test:coverage:ci" : " jest --ci --json --coverage --testLocationInResults --outputFile=report.json" ,
6464 "test:coverage" : " jest --coverage" ,
65+ "test:format" : " prettier . --check" ,
6566 "test:watch" : " jest --watch" ,
6667 "test" : " jest" ,
6768 "build-cjs" : " tsc -p tsconfig-cjs.json" ,
You can’t perform that action at this time.
0 commit comments