Skip to content

Commit 9b4bf95

Browse files
committed
chore: add a ci workflow
1 parent 4971b42 commit 9b4bf95

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/ci.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# This file is managed by code-skeleton. Do not make changes.
2+
name: CI
3+
4+
on:
5+
workflow_dispatch:
6+
pull_request:
7+
push:
8+
branches:
9+
- main
10+
schedule:
11+
# "At 09:00 UTC (02:00 PT) on Monday" https://crontab.guru/#0_9_*_*_1
12+
- cron: "0 9 * * 1"
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
lint:
20+
name: Lint
21+
runs-on: ubuntu-latest
22+
defaults:
23+
run:
24+
shell: bash
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
- name: Setup node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 22.x
32+
registry-url: https://registry.npmjs.org
33+
- name: Update npm
34+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
35+
- name: Install dependencies
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38+
run: npm i --no-audit --no-fund
39+
- name: Lint
40+
run: npm run lint
41+
42+
test:
43+
name: Test
44+
runs-on: ubuntu-latest
45+
defaults:
46+
run:
47+
shell: bash
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v4
51+
- name: Setup node
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: 22.x
55+
registry-url: https://registry.npmjs.org
56+
- name: Update npm
57+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
58+
- name: Install dependencies
59+
run: npm i --no-audit --no-fund
60+
- name: Test
61+
run: npm test --ignore-scripts

0 commit comments

Comments
 (0)