-
Notifications
You must be signed in to change notification settings - Fork 23
177 lines (146 loc) · 4.26 KB
/
ci.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: CI
on:
pull_request:
push:
branches:
- master
- test
tags:
- '*'
workflow_dispatch:
jobs:
dialyzer:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: setup
id: setup
uses: erlef/setup-beam@v1
with:
elixir-version: '1.17.3'
otp-version: '27.1'
- name: mix-cache
uses: actions/cache@v4
id: mix-cache
with:
path: deps
# yamllint disable-line rule:line-length
key: ${{ runner.os }}-${{ steps.setup.outputs.otp-version }}-${{ steps.setup.outputs.elixir-version }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: mix-deps
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: plt-cache
uses: actions/cache@v4
id: plt-cache
with:
path: plts
key: ${{ runner.os }}-${{ steps.setup.outputs.otp-version }}-${{ steps.setup.outputs.elixir-version }}-plts
- name: plt-create
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p plts
mix dialyzer --plt
- name: dialyzer
run: mix dialyzer
quality_actions:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: yamllint .
working-directory: .github
quality_elixir:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: setup
id: setup
uses: erlef/setup-beam@v1
with:
elixir-version: '1.17.3'
otp-version: '27.1'
- name: mix-cache
uses: actions/cache@v4
id: mix-cache
with:
path: deps
# yamllint disable-line rule:line-length
key: ${{ runner.os }}-${{ steps.setup.outputs.otp-version }}-${{ steps.setup.outputs.elixir-version }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: mix-deps
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: check unused deps
run: mix deps.unlock --check-unused
- name: check for compiler warnings
run: |
mix deps.compile
mix compile --warnings-as-errors
- name: format
run: mix format --check-formatted
- name: credo
run: mix credo --strict
test:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- elixir: '1.9.4'
otp: '20.3'
runs-on: ubuntu-20.04
- elixir: '1.10.4'
otp: '21.3'
runs-on: ubuntu-20.04
- elixir: '1.11.4'
otp: '22.3'
runs-on: ubuntu-20.04
- elixir: '1.12.3'
otp: '23.3'
runs-on: ubuntu-20.04
- elixir: '1.13.4'
otp: '24.3'
runs-on: ubuntu-22.04
- elixir: '1.14.5'
otp: '25.3'
runs-on: ubuntu-24.04
- elixir: '1.15.7'
otp: '26.2'
runs-on: ubuntu-24.04
- elixir: '1.16.3'
otp: '26.2'
runs-on: ubuntu-24.04
- elixir: '1.17.3'
otp: '27.1'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: setup
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: mix-cache
uses: actions/cache@v4
id: mix-cache
with:
path: deps
# yamllint disable-line rule:line-length
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: mix-deps
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: test
run: mix coveralls
verify_version_compare:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: php ./test/ext/version_compare.php