Skip to content

Commit e92d672

Browse files
chore: setup ci checks (#54)
* chore: setup ci checks * chore: run test as well
1 parent 48180b8 commit e92d672

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/checks.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Checks
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
- name: Prepare
14+
uses: ./.github/actions/prepare
15+
- name: Build
16+
run: npm run build
17+
18+
format:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
- name: Prepare
25+
uses: ./.github/actions/prepare
26+
- name: Lint
27+
run: npm run format:check
28+
29+
lint:
30+
runs-on: ubuntu-latest
31+
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
- name: Prepare
36+
uses: ./.github/actions/prepare
37+
- name: Lint
38+
run: npm run lint
39+
40+
test:
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
- name: Prepare
47+
uses: ./.github/actions/prepare
48+
- name: Test
49+
run: npm run test
50+
51+
may-merge:
52+
needs: ['format', 'lint', 'build', 'test']
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Cleared for merging
56+
run: echo OK

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"scripts": {
2020
"format": "prettier --write .",
21+
"format:check": "prettier --check .",
2122
"lint": "eslint --max-warnings 0 .",
2223
"build": "node rmdir.mjs && node esbuild.mjs && npm run ts-declaration",
2324
"contributors:add": "all-contributors add",

0 commit comments

Comments
 (0)