7
7
pull_request :
8
8
9
9
jobs :
10
- lint :
11
- runs-on : ubuntu-latest
12
- steps :
13
- - uses : actions/checkout@v2
14
- - name : Install OTP and Elixir
15
- uses : actions/setup-elixir@v1
16
- with :
17
- otp-version : " 23.0"
18
- elixir-version : " 1.10.3"
19
- - run : mix deps.get
20
- - run : mix deps.unlock --check-unused
21
- - run : MIX_ENV=test mix deps.compile
22
- - run : MIX_ENV=test mix compile --warnings-as-errors
23
- - run : mix format --check-formatted
24
10
test :
25
- runs-on : ubuntu-latest
11
+ runs-on : ubuntu-16.04
26
12
strategy :
27
13
matrix :
28
14
db :
@@ -31,27 +17,47 @@ jobs:
31
17
- mysql:8.0
32
18
- mariadb:10.3
33
19
pair :
34
- - elixir : " 1.10 "
35
- erlang : " 23.0 "
20
+ - elixir : 1.11.3
21
+ otp : 23.2.5
36
22
include :
37
23
- db : mysql:8.0
38
24
pair :
39
- elixir : " 1.6.6"
40
- erlang : " 19.3.6.13"
25
+ elixir : 1.11.3
26
+ otp : 23.2.5
27
+ lint : lint
28
+ - db : mysql:8.0
29
+ pair :
30
+ elixir : 1.6.6
31
+ otp : 19.3.6.13
41
32
env :
33
+ MIX_ENV : test
42
34
DB : ${{matrix.db}}
43
35
MYSQL_UNIX_PORT : /var/run/mysqld/mysqld.sock
44
36
steps :
45
37
- run : sudo mkdir -p /var/run/mysqld
46
38
- run : sudo chmod 777 /var/run/mysqld
47
39
- run : docker run -p 3306:3306 --volume /var/run/mysqld:/var/run/mysqld -e MYSQL_ALLOW_EMPTY_PASSWORD=1 --detach ${{matrix.db}} --innodb_log_file_size=1G
48
40
- run : until mysql --port 3306 --protocol=tcp -u root -e "SELECT @@version;"; do sleep 3; done
41
+
49
42
- uses : actions/checkout@v2
50
- - uses : actions/setup-elixir@v1
43
+
44
+ - uses : erlef/setup-elixir@v1
51
45
with :
52
- otp-version : ${{matrix.pair.erlang }}
46
+ otp-version : ${{matrix.pair.otp }}
53
47
elixir-version : ${{matrix.pair.elixir}}
54
- - run : mix deps.get
55
- - run : MIX_ENV=test mix deps.compile
56
- - run : MIX_ENV=test mix compile
48
+
49
+ - name : Install Dependencies
50
+ run : mix deps.get --only test
51
+
52
+ - run : mix format --check-formatted
53
+ if : ${{ matrix.lint }}
54
+
55
+ - run : mix deps.get && mix deps.unlock --check-unused
56
+ if : ${{ matrix.lint }}
57
+
58
+ - run : mix deps.compile
59
+
60
+ - run : mix compile --warnings-as-errors
61
+ if : ${{ matrix.lint }}
62
+
57
63
- run : mix test
0 commit comments