Skip to content

Commit cd228cf

Browse files
committed
ci: add test and draft release workflows
1 parent 0fb95c1 commit cd228cf

File tree

6 files changed

+891
-839
lines changed

6 files changed

+891
-839
lines changed

.github/workflows/draft-release.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 📋 draft release
2+
3+
run-name: 📋 @${{ github.triggering_actor }} is drafting a release
4+
5+
on:
6+
push:
7+
branches: [ main ]
8+
9+
jobs:
10+
draft-release:
11+
name: 📋 draft release
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
issues: write
16+
pull-requests: write
17+
id-token: write
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- uses: asdf-vm/actions/install@v3
23+
- run: npm clean-install
24+
- run: npx semantic-release
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/quality-checks.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: 🔬 quality checks
2+
3+
run-name: 🔬 @${{ github.triggering_actor }} is checking quality on ${{ github.ref_name }}
4+
5+
on:
6+
pull_request:
7+
push:
8+
9+
jobs:
10+
lint:
11+
name: 🧹 lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: asdf-vm/actions/install@v3
16+
- run: make init
17+
- run: make lint
18+
19+
test-with-coverage:
20+
name: 🧪 test
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: asdf-vm/actions/install@v3
25+
- run: make init
26+
- run: make test/coverage

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ commit/pre: lint test
1111
commit/message:
1212
commitlint --edit $(MESSAGE)
1313

14+
init: node_modules ## Initialise dependencies
15+
1416
lint: ## Codebase style checks
1517
npm run lint
1618

@@ -25,3 +27,6 @@ test/watch:
2527

2628
test/coverage:
2729
npm run test:coverage
30+
31+
node_modules:
32+
@npm install

0 commit comments

Comments
 (0)