-
Notifications
You must be signed in to change notification settings - Fork 4
79 lines (72 loc) · 1.86 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Lint and test
on: push
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: yarn
- run: yarn lint
test:
strategy:
matrix:
node-version: [18, 20, 21]
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
mongodb:
image: mongo
ports:
- 27017:27017
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{matrix.node-version}}
- run: yarn
- run: node test/smoketest.mjs
- run: yarn test
env:
POSTGRES_URL: postgres://postgres:postgres@localhost:5432
MONGODB_URI: mongodb://localhost:27017
windows-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: yarn
- run: yarn prepack
- run: yarn test || yarn jest --no-silent --verbose --onlyFailures
- run: node test/smoketest.mjs
release:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
if: github.ref_name == 'main'
needs: [lint, test]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.SEMANTIC_RELEASE_BOT_GITHUB_TOKEN }}
- uses: actions/setup-node@v3
- run: yarn
- run: yarn prepack
- run: yarn semantic-release
env:
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_GITHUB_TOKEN }}