-
Notifications
You must be signed in to change notification settings - Fork 71
101 lines (94 loc) · 2.58 KB
/
elixir-build-and-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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Elixir Unit Tests
on:
push:
branches:
- master
pull_request:
branches:
- "**"
jobs:
build:
name: Elixir Unit Tests
runs-on: ubuntu-20.04
env:
MIX_ENV: test
PGPASSWORD: postgres
strategy:
matrix:
include:
# Elixir 1.11 doesn't support OTP 25+
- elixir: '1.11.4'
otp: '22.3'
- elixir: '1.11.4'
otp: '23.3.4'
- elixir: '1.11.4'
otp: '24.3.4'
# Elixir 1.12 doesn't support OTP 25+
- elixir: '1.12.3'
otp: '22.3'
- elixir: '1.12.3'
otp: '23.3.4'
- elixir: '1.12.3'
otp: '24.3.4'
# Elixir 1.13 doesn't support OTP 26+
- elixir: '1.13.4'
otp: '22.3'
- elixir: '1.13.4'
otp: '23.3.4'
- elixir: '1.13.4'
otp: '24.3.4'
- elixir: '1.13.4'
otp: '25.3.2'
# Elixir 1.14 requires at least OTP 23
- elixir: '1.14.4'
otp: '23.3.4'
- elixir: '1.14.4'
otp: '24.3.4'
- elixir: '1.14.4'
otp: '25.3.2'
- elixir: '1.14.4'
otp: '26.2.5'
# Elixir 1.15 requires at least OTP 24
- elixir: '1.15.5'
otp: '24.3.4'
- elixir: '1.15.5'
otp: '25.3.2'
- elixir: '1.15.5'
otp: '26.2.5'
# Elixir 1.16 requires at least OTP 24
- elixir: '1.16.2'
otp: '24.3.4'
- elixir: '1.16.2'
otp: '25.3.2'
- elixir: '1.16.2'
otp: '26.2.5'
services:
db:
image: postgis/postgis:13-3.1
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: geo_postgrex_test
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Elixir Project
uses: ./.github/actions/elixir-setup
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
build-app: false
- name: Compile with warnings as errors
if: ${{ matrix.elixir != '1.11.4' }}
run: mix compile --warnings-as-errors
- name: Run tests with warnings as errors
if: ${{ matrix.elixir != '1.11.4' }}
run: mix test --warnings-as-errors
- name: Run tests
run: mix test