@@ -7,52 +7,59 @@ name: Elixir CI
7
7
8
8
on :
9
9
push :
10
- branches : [ "master" ]
10
+ branches : ["master"]
11
11
pull_request :
12
- branches : [ "master" ]
12
+ branches : ["master"]
13
13
14
14
permissions :
15
15
contents : read
16
16
17
17
jobs :
18
18
build :
19
-
20
19
name : Build and test
21
20
runs-on : ubuntu-latest
22
-
21
+ strategy :
22
+ matrix :
23
+ elixir : ["1.15.8", "1.16.3", "1.17.3", "1.18.2"]
24
+ otp : ["25.3.2", "26.2.5", "27.2.4"]
25
+ exclude :
26
+ - elixir : " 1.15.8"
27
+ otp : " 27.2.4"
28
+ - elixir : " 1.16.3"
29
+ otp : " 27.2.4"
23
30
steps :
24
- - name : Configure sysctl limits
25
- run : |
26
- sudo swapoff -a
27
- sudo sysctl -w vm.swappiness=1
28
- sudo sysctl -w fs.file-max=262144
29
- sudo sysctl -w vm.max_map_count=262144
30
-
31
- - name : Runs Elasticsearch
32
- uses : elastic/elastic-github-actions/elasticsearch@master
33
- with :
34
- stack-version : 7.17.16
35
- security-enabled : false
36
-
37
- - name : Checkout code
38
- uses : actions/checkout@v4
39
-
40
- - name : Set up Elixir
41
- uses : erlef/setup-beam@v1
42
- with :
43
- version-file : .tool-versions
44
- version-type : strict
45
-
46
- - name : Restore dependencies cache
47
- uses : actions/cache@v3
48
- with :
49
- path : deps
50
- key : ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
51
- restore-keys : ${{ runner.os }}-mix-
52
-
53
- - name : Install dependencies
54
- run : mix deps.get
55
-
56
- - name : Run tests
57
- run : mix test
31
+ - name : Configure sysctl limits
32
+ run : |
33
+ sudo swapoff -a
34
+ sudo sysctl -w vm.swappiness=1
35
+ sudo sysctl -w fs.file-max=262144
36
+ sudo sysctl -w vm.max_map_count=262144
37
+
38
+ - name : Runs Elasticsearch
39
+ uses : elastic/elastic-github-actions/elasticsearch@master
40
+ with :
41
+ stack-version : 7.17.16
42
+ security-enabled : false
43
+
44
+ - name : Checkout code
45
+ uses : actions/checkout@v4
46
+
47
+ - name : Set up Elixir
48
+ uses : erlef/setup-beam@v1
49
+ with :
50
+ otp-version : ${{matrix.otp}}
51
+ elixir-version : ${{matrix.elixir}}
52
+
53
+ - name : Restore dependencies cache
54
+ uses : actions/cache@v3
55
+ with :
56
+ path : deps
57
+ key : ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
58
+ restore-keys : ${{ runner.os }}-mix-
58
59
60
+ - name : Install dependencies
61
+ run : mix deps.get
62
+ - name : Compile
63
+ run : mix compile --warnings-as-errors
64
+ - name : Run tests
65
+ run : mix test
0 commit comments