@@ -3,24 +3,73 @@ name: lint-and-test
3
3
on : [push, workflow_dispatch]
4
4
5
5
jobs :
6
- test :
6
+ test-current :
7
7
strategy :
8
8
fail-fast : false
9
9
matrix :
10
- versions :
11
- - elixir : ' 1.14'
12
- otp : ' 24.2'
13
- - elixir : ' 1.14'
14
- otp : ' 24.3'
15
- - elixir : ' 1.14'
16
- otp : ' 25.3'
10
+ os :
11
+ - ' ubuntu-22.04'
12
+ - ' ubuntu-24.04'
17
13
18
- - elixir : ' 1.15'
19
- otp : ' 24.3'
20
- - elixir : ' 1.15'
21
- otp : ' 25.3'
22
- - elixir : ' 1.15'
23
- otp : ' 26.2'
14
+ runs-on : ${{ matrix.os }}
15
+
16
+ services :
17
+ postgres :
18
+ image : postgres:10
19
+ env :
20
+ POSTGRES_USER : admin
21
+ POSTGRES_PASSWORD : admin
22
+ options : >-
23
+ --health-cmd pg_isready
24
+ --health-interval 10s
25
+ --health-timeout 5s
26
+ --health-retries 5
27
+ ports :
28
+ - 5432:5432
29
+
30
+ steps :
31
+ - uses : actions/checkout@v4
32
+
33
+ - uses : erlef/setup-beam@v1
34
+ with :
35
+ elixir-version : ' 1.16'
36
+ otp-version : ' 25.3'
37
+
38
+ - uses : actions/cache@v4
39
+ with :
40
+ path : |
41
+ deps
42
+ _build
43
+ key : mix-${{ hashFiles('mix.lock') }}
44
+
45
+ - run : mix local.hex --force
46
+ - run : mix local.rebar --force
47
+ - run : mix deps.get
48
+ - run : mix compile # after fixing warnings, add --warnings-as-errors
49
+ - run : mix test
50
+
51
+
52
+ test-matrix :
53
+ # if a matrix-job with newer versions passes, advance the current versions!
54
+ continue-on-error : true
55
+
56
+ strategy :
57
+ fail-fast : false
58
+ matrix :
59
+ versions :
60
+ # - elixir: '1.14'
61
+ # otp: '24.2'
62
+ # - elixir: '1.14'
63
+ # otp: '24.3'
64
+ # - elixir: '1.14'
65
+ # otp: '25.3'
66
+ #
67
+ # - elixir: '1.15'
68
+ # otp: '24.3'
69
+ # - elixir: '1.15'
70
+ # otp: '25.3'
71
+ # - elixir: '1.15'
72
+ # otp: '26.2'
24
73
25
74
- elixir : ' 1.16'
26
75
otp : ' 24.3'
@@ -41,11 +90,15 @@ jobs:
41
90
- ' ubuntu-24.04'
42
91
43
92
exclude :
44
- - versions :
45
- elixir : ' 1.14'
46
- otp : ' 24.2'
47
- os : ' ubuntu-24.04'
48
- - versions :
93
+ - versions : # current
94
+ elixir : ' 1.16'
95
+ otp : ' 25.3'
96
+
97
+ # - versions: # not supported
98
+ # elixir: '1.14'
99
+ # otp: '24.2'
100
+ # os: 'ubuntu-24.04'
101
+ - versions : # not supported
49
102
elixir : ' 1.16'
50
103
otp : ' 24.3'
51
104
os : ' ubuntu-22.04'
71
124
72
125
- uses : erlef/setup-beam@v1
73
126
with :
74
- otp-version : ${{ matrix.versions.otp }}
75
127
elixir-version : ${{ matrix.versions.elixir }}
128
+ otp-version : ${{ matrix.versions.otp }}
76
129
77
130
- uses : actions/cache@v4
78
131
with :
@@ -84,11 +137,12 @@ jobs:
84
137
- run : mix local.hex --force
85
138
- run : mix local.rebar --force
86
139
- run : mix deps.get
87
- - run : mix compile # --warnings-as-errors
140
+ - run : mix compile # after fixing warnings, add --warnings-as-errors
88
141
- run : mix test
89
142
90
143
91
- lint :
144
+ pseudo-lint :
145
+ continue-on-error : true # TODO: use `mix format` & check in files, then set this false
92
146
strategy :
93
147
fail-fast : false
94
148
matrix :
@@ -112,8 +166,8 @@ jobs:
112
166
113
167
- uses : erlef/setup-beam@v1
114
168
with :
115
- otp-version : ${{ matrix.versions.otp }}
116
169
elixir-version : ${{ matrix.versions.elixir }}
170
+ otp-version : ${{ matrix.versions.otp }}
117
171
118
172
- uses : actions/cache@v4
119
173
with :
@@ -122,5 +176,4 @@ jobs:
122
176
_build
123
177
key : mix-${{ hashFiles('mix.lock') }}
124
178
125
- # - run: mix format '{lib,priv,test,config}/**/*.{ex,exs}'
126
179
- run : mix format --check-formatted '{lib,priv,test,config}/**/*.{ex,exs}'
0 commit comments