-
Notifications
You must be signed in to change notification settings - Fork 4
111 lines (85 loc) · 2.56 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
name: Tests
on:
push:
branches:
- "master"
pull_request:
branches:
- "*"
jobs:
tests:
name: Run tests (OS ${{ matrix.os-version }} / OTP ${{ matrix.otp-version }} / Elixir ${{ matrix.elixir-version }} / EdgeDB ${{ matrix.edgedb-version }})
strategy:
matrix:
os-version:
- "ubuntu-22.04"
otp-version:
- "24.3"
- "26.0"
elixir-version:
- "1.12"
- "1.13"
- "1.14"
- "1.15"
edgedb-version:
- "1.0"
- "2.0"
- "3.0"
exclude:
- elixir-version: "1.12"
otp-version: "26.0"
- elixir-version: "1.13"
otp-version: "26.0"
- elixir-version: "1.14"
otp-version: "24.3"
- elixir-version: "1.15"
otp-version: "24.3"
runs-on: ${{ matrix.os-version }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Remove migrations for EdgeDB versions greater then current major version (${{ matrix.edgedb-version }})
env:
EDGEDB_VERSION: ${{ matrix.edgedb-version }}
run: |
EDGEDB_VERSION=${EDGEDB_VERSION%%.*}
for migration_file in `ls priv/edgedb/schema/migrations/`
do
migration_number=${migration_file%.*}
if test ${migration_number} -gt ${EDGEDB_VERSION}
then
rm "priv/edgedb/schema/migrations/${migration_file}"
fi
done
echo "EDGEDB_VERSION=${EDGEDB_VERSION}" >> ${GITHUB_ENV}
- uses: edgedb/[email protected]
with:
server-version: ${{ matrix.edgedb-version }}
instance-name: edgedb_elixir
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp-version }}
elixir-version: ${{ matrix.elixir-version }}
- name: Set up cache
uses: actions/[email protected]
id: cache
with:
path: |
deps
_build
priv/plts
key: tests-${{ matrix.os-version }}-${{ matrix.otp-version }}-${{ matrix.elixir-version }}-${{ hashFiles('mix.lock') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: mix deps.get --only test
- name: Create requried users
run: mix edgedb.roles.setup
- name: Run tests
run: mix coveralls
result:
name: Tests conclusion
needs: tests
runs-on: ubuntu-22.04
steps:
- run: "echo 'Completed!'"