You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Set up a Postgres DB service. By default, Phoenix applications
24
-
# use Postgres. This creates a database for running tests.
25
-
# Additional services can be defined here if required.
26
18
services:
27
19
db:
28
20
image: postgres:12
@@ -38,24 +30,19 @@ jobs:
38
30
runs-on: ubuntu-latest
39
31
name: Test on OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
40
32
strategy:
41
-
# Specify the OTP and Elixir versions to use when building
42
-
# and running the workflow steps.
43
33
matrix:
44
-
otp: ["27.2"]# Define the OTP version [required]
45
-
elixir: ["1.18.1"]# Define the elixir version [required]
34
+
otp: ["27.2"]
35
+
elixir: ["1.18.1"]
46
36
steps:
47
-
# Step: Setup Elixir + Erlang image as the base.
48
37
- name: Set up Elixir
49
38
uses: erlef/setup-beam@v1
50
39
with:
51
40
otp-version: ${{matrix.otp}}
52
41
elixir-version: ${{matrix.elixir}}
53
42
54
-
# Step: Check out the code.
55
43
- name: Checkout code
56
44
uses: actions/checkout@v3
57
45
58
-
# Step: Define how to cache deps. Restores existing cache if present.
59
46
- name: Cache deps
60
47
id: cache-deps
61
48
uses: actions/cache@v3
@@ -67,9 +54,6 @@ jobs:
67
54
restore-keys: |
68
55
${{ runner.os }}-mix-${{ env.cache-name }}-
69
56
70
-
# Step: Define how to cache the `_build` directory. After the first run,
71
-
# this speeds up tests runs a lot. This includes not re-compiling our
72
-
# project's downloaded deps every run.
73
57
- name: Cache compiled build
74
58
id: cache-build
75
59
uses: actions/cache@v3
@@ -82,17 +66,12 @@ jobs:
82
66
${{ runner.os }}-mix-${{ env.cache-name }}-
83
67
${{ runner.os }}-mix-
84
68
85
-
# Step: Download project dependencies. If unchanged, uses
86
-
# the cached version.
87
69
- name: Install dependencies
88
70
run: mix deps.get
89
71
90
-
# Step: Compile the project treating any warnings as errors.
91
-
# Customize this step if a different behavior is desired.
92
-
- name: Compiles without warnings
72
+
- name: Compile without warnings
93
73
run: mix compile --warnings-as-errors
94
74
95
-
# Step: Restore PLT cache. Cache key based on Erlang/Elixir version and the mix.lock hash
96
75
- name: Restore PLT cache
97
76
id: plt_cache
98
77
uses: actions/cache/restore@v3
@@ -104,12 +83,10 @@ jobs:
104
83
path: |
105
84
priv/plts
106
85
107
-
# Step: Create PLTs if no cache was found
108
86
- name: Create PLTs
109
87
if: steps.plt_cache.outputs.cache-hit != 'true'
110
88
run: mix dialyzer --plt
111
89
112
-
# Step: Save PLT cache. By default, the GitHub Cache action will only save the cache if all steps in the job succeed, so we separate the cache restore and save steps in case running dialyzer fails.
113
90
- name: Save PLT cache
114
91
id: plt_cache_save
115
92
uses: actions/cache/save@v3
@@ -120,19 +97,11 @@ jobs:
120
97
path: |
121
98
priv/plts
122
99
123
-
# Step: Run dialyzer
124
100
- name: Run dialyzer
125
-
# Two formats are included for ease of debugging and it is lightly recommended to use both, see https://github.com/jeremyjh/dialyxir/issues/530 for reasoning
126
-
# --format github is helpful to print the warnings in a way that GitHub understands and can place on the /files page of a PR
127
-
# --format dialyxir allows the raw GitHub actions logs to be useful because they have the full warning printed
0 commit comments