-
Notifications
You must be signed in to change notification settings - Fork 66
132 lines (111 loc) · 3.64 KB
/
tests.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: tests
on:
push:
branches:
- master
- ci
pull_request:
jobs:
test:
# Skip tests when doing a release to avoid the workflow race
# when the release PR gets merged by the bot.
if: needs.prep.outputs.version == 0
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.edgedb-version == 'nightly' }}
strategy:
matrix:
node-version: ["18", "20"]
os: [ubuntu-latest]
edgedb-version: ["stable"]
include:
- os: ubuntu-latest
node-version: "18"
edgedb-version: "nightly"
- os: ubuntu-latest
node-version: "18"
edgedb-version: "3"
- os: ubuntu-latest
node-version: "18"
edgedb-version: "2"
- os: macos-latest
node-version: "18"
edgedb-version: "stable"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 50
submodules: true
- name: Setup WSL
if: ${{ matrix.os == 'windows-2019' }}
uses: vampire/setup-wsl@v1
with:
wsl-shell-user: edgedb
additional-packages: ca-certificates
curl
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Install dev deps
run: |
yarn
- name: Lint
run: |
yarn lint
- name: Check format
run: |
yarn run format:check
- name: ESLint (ignore failures for now)
run: |
yarn eslint || echo "ESLint still failing... Fine for now!"
- name: Build
run: |
yarn workspace edgedb build
yarn workspace @edgedb/auth-core build
yarn workspace @edgedb/auth-nextjs build
yarn workspace @edgedb/generate build
# - name: Compile for Deno
# run: |
# yarn build:deno
- name: Install EdgeDB
uses: edgedb/setup-edgedb@8bc9e10005674ec772652b86e1fdd476e6462284
with:
instance-name: test
server-version: ${{ matrix.edgedb-version }}
- name: Show actual EdgeDB server version
run: |
echo ACTIVE_EDGEDB_VERSION=$(edgedb query 'select sys::get_version_as_str()' -I test) >> $GITHUB_ENV
- name: Run query builder tests
run: |
yarn workspace @edgedb/generate test:ci
- name: Run query builder integration tests legacy
if: ${{ matrix.edgedb-version == '2' }}
run: |
yarn workspace @edgedb/integration-legacy test:ci
- name: Run query builder integration tests lts
if: ${{ matrix.edgedb-version == '3' || matrix.edgedb-version == 'stable' || matrix.edgedb-version == 'nightly' }}
run: |
yarn workspace @edgedb/integration-lts test:ci
- name: Run query builder integration tests stable
if: ${{ matrix.edgedb-version == 'stable' || matrix.edgedb-version == 'nightly' }}
run: |
yarn workspace @edgedb/integration-stable test:ci
- name: Run query builder integration tests nightly
if: ${{ matrix.edgedb-version == 'nightly' }}
run: |
yarn workspace @edgedb/integration-nightly test:ci
- name: Run functional tests
run: |
yarn workspace edgedb test
# This job exists solely to act as the test job aggregate to be
# targeted by branch policies.
regression-tests:
name: "Regression Tests"
needs: [test]
runs-on: ubuntu-latest
steps:
- run: echo OK