-
-
Notifications
You must be signed in to change notification settings - Fork 379
85 lines (81 loc) · 2.19 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
80
81
82
83
84
85
name: Continuous Integration Testing
on:
pull_request:
branches:
- 'master'
- 'main'
schedule:
- cron: '0 0 * * *'
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
test:
[
complex-sample,
cqrs-sample,
graphql-sample,
http-sample,
microservice-sample,
mongo-sample,
mongodb-transaction-sample,
render-sample,
rxjs-sample,
sequelize-sample,
simple-sample,
typeorm-sample,
prisma-sample,
websocket-sample,
]
steps:
- uses: actions/checkout@v2
- name: Use NodeJS ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 8
run_install: true
- name: Generate Prisma Schema
if: ${{ matrix.test == 'prisma-sample' }}
run: pnpx prisma generate --schema apps/prisma-sample/prisma/schema.prisma
- name: pnpm test
run: pnpm nx test ${{ matrix.test }}
e2e-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
needs: [unit-tests]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Start Docker-Compose
run: docker compose up -d
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 8
run_install: true
- name: Run tests
run: pnpm run test:e2e
- name: Stop Docker-Compose
run: docker compose down
automerge:
needs: e2e-test
if: contains(github.event.pull_request.user.login, 'dependabot')
runs-on: ubuntu-latest
steps:
- name: automerge
uses: 'pascalgn/[email protected]'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
MERGE_LABELS: ''
MERGE_METHOD: rebase