Skip to content

Commit d55569b

Browse files
authored
ci: main pipeline improvements (#799)
1 parent b006e61 commit d55569b

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

.github/workflows/pipeline.yml

+10-13
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@ concurrency:
2020

2121
jobs:
2222
code_validation:
23-
name: Code Validation
23+
name: 'Code Validation: ${{ matrix.validation_script }}'
2424
runs-on: ubuntu-latest
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
validation_script:
29+
['lint', 'type-check', 'format:check', 'generate-all:check']
2530

2631
steps:
2732
- name: Checkout
@@ -37,23 +42,15 @@ jobs:
3742
with:
3843
useLockFile: false
3944

40-
- name: Check Types
41-
run: npm run type-check
42-
43-
- name: Lint code
44-
run: npm run lint
45-
46-
- name: Check format
47-
run: npm run format:check
48-
49-
- name: Check autogenerated docs
50-
run: npm run generate-all && git diff --exit-code
45+
- name: Run script
46+
run: npm run ${{ matrix.validation_script }}
5147

5248
tests:
5349
name: Tests (Node v${{ matrix.node }} - ESLint v${{ matrix.eslint }})
5450
runs-on: ubuntu-latest
5551

5652
strategy:
53+
fail-fast: false
5754
matrix:
5855
# The .x indicates "the most recent one"
5956
node: [19.x, 18.x, 17.x, 16.x, 14.x, 14.17.0, 12.x, 12.22.0]
@@ -105,7 +102,7 @@ jobs:
105102
- name: Build package
106103
run: npm run build
107104

108-
- name: Release new version to NPM
105+
- name: Release the new version to NPM
109106
env:
110107
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111108
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"prebuild": "del-cli dist",
3535
"build": "tsc",
3636
"generate-all": "run-p \"generate:*\"",
37+
"generate-all:check": "npm run generate-all && git diff --exit-code",
3738
"generate:configs": "ts-node tools/generate-configs",
3839
"generate:rules-doc": "npm run build && npm run rule-doc-generator",
3940
"format": "npm run prettier-base -- --write",

0 commit comments

Comments
 (0)