Skip to content

Commit dbf7fc8

Browse files
authored
chore: add PR build and test workflow (#4)
1 parent 3daf031 commit dbf7fc8

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: '20.x'
15+
- name: Install dependencies
16+
run: yarn
17+
- name: Build
18+
run: yarn build
19+
- name: Test
20+
run: yarn test

.github/workflows/publish-docs.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ jobs:
2222
- uses: actions/setup-node@v4
2323
with:
2424
node-version: '20.x'
25-
registry-url: 'https://registry.npmjs.org'
26-
scope: '@assert-equals'
27-
- run: yarn && yarn docs
28-
- name: 'Upload Pages artifact'
29-
uses: 'actions/upload-pages-artifact@v3'
25+
- name: Install dependencies
26+
run: yarn
27+
- name: Generate documentation
28+
run: yarn docs
29+
- name: Upload Pages artifact
30+
uses: actions/upload-pages-artifact@v3
3031
with:
3132
path: 'docs/'
3233

.github/workflows/publish-package-npm.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Publish package to npm
2+
23
on:
34
push:
45
tags:
@@ -18,7 +19,11 @@ jobs:
1819
node-version: '20.x'
1920
registry-url: 'https://registry.npmjs.org'
2021
scope: '@assert-equals'
21-
- run: yarn && yarn build
22-
- run: yarn publish
22+
- name: Install dependencies
23+
run: yarn
24+
- name: Build
25+
run: yarn build
26+
- name: Publish to npm
27+
run: yarn publish
2328
env:
2429
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)