-
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.
chore(ci.yml): improve ci.yml workflow (#179)
- Loading branch information
Showing
1 changed file
with
49 additions
and
8 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 |
---|---|---|
@@ -1,25 +1,66 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
Build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b | ||
|
||
- uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
|
||
- run: npm ci | ||
- run: npm run build | ||
- run: npm run format | ||
- run: npm run lint | ||
- run: npm run pack | ||
- run: npm run test:coverage | ||
|
||
- uses: EndBug/add-and-commit@998652d28d7702d095d40f52ae42982a80ae8c7d | ||
with: | ||
message: 'Diff from format, lint and pack' | ||
|
||
lint_prettier: | ||
name: "Lint (prettier)" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b | ||
|
||
- uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npx --no-install prettier --check **/*.ts | ||
|
||
lint_eslint: | ||
name: "Lint (eslint)" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b | ||
|
||
- uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
|
||
- run: npm ci | ||
- run: npx --no-install eslint src/**/*.ts | ||
|
||
Test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b | ||
|
||
- uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
|
||
- run: npm ci | ||
- run: npm run test:coverage |