Skip to content

Commit 4e59e55

Browse files
committed
ci: init
1 parent c693905 commit 4e59e55

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/commitlint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Commitlint
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize, reopened]
6+
7+
concurrency:
8+
group: commitlint-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
lint-commits:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup Node and pnpm
20+
uses: silverhand-io/actions-node-pnpm-run-steps@v4
21+
22+
- name: Commitlint
23+
run: npx commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD
24+
25+
- name: Commitlint on PR title
26+
run: echo '${{ github.event.pull_request.title }}' | npx commitlint

.github/workflows/main.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Main
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
pull_request:
9+
10+
concurrency:
11+
group: main-${{ github.head_ref || github.run_id }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
main:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Setup Node and pnpm
22+
uses: silverhand-io/actions-node-pnpm-run-steps@v4
23+
24+
- name: Build
25+
run: pnpm -r build
26+
27+
- name: Lint
28+
run: pnpm -r lint
29+
30+
- name: Test
31+
run: pnpm -r test

0 commit comments

Comments
 (0)