Skip to content

Commit

Permalink
ci: main pipeline improvements (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
Belco90 committed Aug 22, 2023
1 parent b006e61 commit d55569b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ concurrency:

jobs:
code_validation:
name: Code Validation
name: 'Code Validation: ${{ matrix.validation_script }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
validation_script:
['lint', 'type-check', 'format:check', 'generate-all:check']

steps:
- name: Checkout
Expand All @@ -37,23 +42,15 @@ jobs:
with:
useLockFile: false

- name: Check Types
run: npm run type-check

- name: Lint code
run: npm run lint

- name: Check format
run: npm run format:check

- name: Check autogenerated docs
run: npm run generate-all && git diff --exit-code
- name: Run script
run: npm run ${{ matrix.validation_script }}

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

strategy:
fail-fast: false
matrix:
# The .x indicates "the most recent one"
node: [19.x, 18.x, 17.x, 16.x, 14.x, 14.17.0, 12.x, 12.22.0]
Expand Down Expand Up @@ -105,7 +102,7 @@ jobs:
- name: Build package
run: npm run build

- name: Release new version to NPM
- name: Release the new version to NPM
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"prebuild": "del-cli dist",
"build": "tsc",
"generate-all": "run-p \"generate:*\"",
"generate-all:check": "npm run generate-all && git diff --exit-code",
"generate:configs": "ts-node tools/generate-configs",
"generate:rules-doc": "npm run build && npm run rule-doc-generator",
"format": "npm run prettier-base -- --write",
Expand Down

0 comments on commit d55569b

Please sign in to comment.