-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (92 loc) · 2.92 KB
/
all_tests.yaml
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
86
87
88
89
90
91
92
93
94
name: Run tests
on: [push, pull_request]
jobs:
core:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x] # All LTS supported versions
steps:
- name: Git checkout
uses: actions/checkout@v3
- uses: pnpm/[email protected]
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: ${{ !env.ACT && 'pnpm' || '' }} # Disable cache for nektos/act
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm test
env:
CI: true
mongo: # mongo specific test suite
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x] # LTS node
mongodb-version: ["5.0", "6.0"] # Mongo 5 & 6
steps:
- name: Git checkout
uses: actions/checkout@v3
- uses: pnpm/[email protected]
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: ${{ !env.ACT && 'pnpm' || '' }} # Disable cache for nektos/act
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
mongodb-replica-set: test-rs
mongodb-port: 27017
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm test ./test/driver/mongo.spec.ts
env:
CI: true
MONGO_URI: mongodb://localhost:27017?replicaSet=test-rs
postgres: # postgres specific test suite
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x] # LTS node
# Postgres notes:
# https://www.postgresql.org/about/featurematrix/
# CTEs 12+
# Stored generated columns 12+
# UNIQUE NULLS NOT DISTINCT 15+ (future plans)
pg-version: ["12", "13", "14", "15"]
steps:
- name: Git checkout
uses: actions/checkout@v3
- uses: pnpm/[email protected]
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: ${{ !env.ACT && 'pnpm' || '' }} # Disable cache for nektos/act
- name: Setup Postgres database
uses: Daniel-Marynicz/postgresql-action@master
with:
postgres_image_tag: 12-alpine
app_user: app
app_user_password: test
app_db: app
postgres_extensions: uuid-ossp pgcrypto
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm test ./test/driver/postgres.spec.ts
env:
CI: true
POSTGRES_URL: postgres://app:test@localhost:5432/app