-
Notifications
You must be signed in to change notification settings - Fork 7
78 lines (68 loc) · 2.03 KB
/
test.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
name: mix
on:
pull_request:
push:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
env:
MIX_ENV: test
strategy:
matrix:
elixir: ["1.14", "1.15", "1.16"]
otp: ["25", "26"]
clickhouse: ["latest"]
timezone: ["UTC"]
include:
- elixir: "1.16"
otp: "26"
clickhouse: "latest"
timezone: "Europe/Berlin"
# Plausible
# - https://github.com/plausible/analytics/blob/master/.tool-versions
# - https://github.com/plausible/analytics/blob/master/.github/workflows/elixir.yml
- elixir: "1.16.0"
otp: "26.2.1"
clickhouse: "23.3.7.5"
timezone: "UTC"
services:
clickhouse:
image: clickhouse/clickhouse-server:${{ matrix.clickhouse }}
ports:
- 8123:8123
env:
TZ: ${{ matrix.timezone }}
options: >-
--health-cmd nc -zw3 localhost 8124
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- uses: actions/cache@v4
with:
path: |
deps
_build
key: test-${{ matrix.otp }}-${{ matrix.elixir }}-${{ github.head_ref || github.ref }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
test-${{ matrix.otp }}-${{ matrix.elixir }}-${{ github.head_ref || github.ref }}-
test-${{ matrix.otp }}-${{ matrix.elixir }}-refs/heads/master-
- run: mix deps.get --only $MIX_ENV
- run: mix compile --warnings-as-errors
- run: mix test --include slow
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: "1"
otp-version: "26"
- run: elixir -v
- run: mix format --check-formatted