-
Notifications
You must be signed in to change notification settings - Fork 348
113 lines (111 loc) · 4.6 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: CI
on:
pull_request:
# This configuration cancels previous runs if a new run is started on the same PR. Only one run at a time per PR.
# from https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
install-and-build:
strategy:
fail-fast: false
matrix:
node-version: [10, 18, 20]
name: Upload install and build artifact (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Compress artifact
run: tar -cf install-build-node-${{ matrix.node-version }}.tar ./packages/core/lib ./packages/core/types ./packages/validator-js/lib ./packages/validator-js/types ./node_modules
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: install-build-artifact-node-${{ matrix.node-version }}
path: install-build-node-${{ matrix.node-version }}.tar
retention-days: 1
test-sqlite:
strategy:
fail-fast: false
matrix:
node-version: [10, 18, 20]
name: sqlite (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
needs: [ install-and-build ]
env:
DIALECT: sqlite
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
name: install-build-artifact-node-${{ matrix.node-version }}
- name: Extract artifact
run: tar -xf install-build-node-${{ matrix.node-version }}.tar
- run: /bin/bash ./setup/prepare-ci.sh
- name: Execute SSCCE
run: yarn run _test
test-postgres:
strategy:
fail-fast: false
matrix:
node-version: [10, 18, 20]
postgres-version: [oldest, latest]
minify-aliases: [true, false]
native: [true, false]
name: postgres ${{ matrix.postgres-version }}${{ matrix.native && ' (native)' || '' }} (Node ${{ matrix.node-version }})${{ matrix.minify-aliases && ' (minified aliases)' || '' }}
runs-on: ubuntu-latest
needs: [ install-and-build ]
env:
DIALECT: ${{ matrix.native && 'postgres-native' || 'postgres' }}
SEQ_PG_MINIFY_ALIASES: ${{ matrix.minify-aliases && '1' || '' }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
name: install-build-artifact-node-${{ matrix.node-version }}
- name: Extract artifact
run: tar -xf install-build-node-${{ matrix.node-version }}.tar
- run: yarn start-postgres-${{ matrix.postgres-version }}
- run: /bin/bash ./setup/prepare-ci.sh
- name: Execute SSCCE
run: yarn run _test
test-oldest-latest:
strategy:
fail-fast: false
matrix:
node-version: [10, 18, 20]
database-version: [oldest, latest]
dialect: [mysql, mariadb, mssql, db2]
name: ${{ matrix.dialect }} ${{ matrix.database-version }} (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
needs: [ install-and-build ]
env:
DIALECT: ${{ matrix.dialect }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
name: install-build-artifact-node-${{ matrix.node-version }}
- name: Extract artifact
run: tar -xf install-build-node-${{ matrix.node-version }}.tar
- run: yarn start-${{ matrix.dialect }}-${{ matrix.database-version }}
- run: /bin/bash ./setup/prepare-ci.sh
- name: Execute SSCCE
run: yarn run _test