add: Node.js CI workflow template
This commit is contained in:
22
workflows/node-ci.yml
Normal file
22
workflows/node-ci.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- run: npm ci
|
||||
- run: npm test --if-present
|
||||
- run: npm run lint --if-present
|
||||
- run: npm run build --if-present
|
||||
Reference in New Issue
Block a user