Repository navigation
136 lines (118 loc) · 4.08 KB
/
Copy pathelixir.yml
File metadata and controls
136 lines (118 loc) · 4.08 KB
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
name: Elixir CI
permissions:
contents: read
env:
PROTOX_PROTOBUF_VERSION: "34.1"
# Published by upstream in the pinned v34.1 release metadata for this asset.
PROTOX_PROTOBUF_SHA256: "af27ea66cd26938fe48587804ca7d4817457a08350021a1c6e23a27ccc8c6904"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MIX_ENV: test
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
jobs:
build:
runs-on: ubuntu-24.04
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} ${{matrix.name_suffix}}
strategy:
fail-fast: false
matrix:
include:
- elixir: "1.15"
otp: "26"
dialyzer: true
- elixir: "1.16"
otp: "26"
dialyzer: true
- elixir: "1.17"
otp: "27"
check_format: true
check_deps: true
dialyzer: true
- elixir: "1.18"
otp: "27"
check_format: true
check_deps: true
dialyzer: true
- elixir: "1.19"
otp: "28"
check_format: true
check_deps: true
dialyzer: true
- elixir: "1.20"
otp: "29"
check_format: true
check_deps: true
dialyzer: true
- elixir: "1.20"
otp: "29"
check_format: true
check_deps: true
dialyzer: true
unlock_deps: true
name_suffix: "(unlock deps)"
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Elixir
uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0
with:
elixir-version: ${{matrix.elixir}}
otp-version: ${{matrix.otp}}
- name: Restore dependencies cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }}
- name: Restore PLT cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }}
- name: Unlock all dependencies
run: mix deps.unlock --all
if: ${{ matrix.unlock_deps }}
- name: Install dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Install protoc
run: |
protoc_zip="protoc-${{ env.PROTOX_PROTOBUF_VERSION }}-linux-x86_64.zip"
wget "https://github.com/protocolbuffers/protobuf/releases/download/v${{ env.PROTOX_PROTOBUF_VERSION }}/${protoc_zip}"
if ! echo "${{ env.PROTOX_PROTOBUF_SHA256 }} ${protoc_zip}" | sha256sum --check --; then
echo "Checksum verification failed for ${protoc_zip}" >&2
exit 1
fi
unzip -d protoc "${protoc_zip}"
echo "${PWD}/protoc/bin" >> "$GITHUB_PATH"
"${PWD}/protoc/bin/protoc" --version
- name: Compile prod with warnings as errors
run: MIX_ENV=prod mix compile --warnings-as-errors
- name: Run tests
run: mix coveralls.github --parallel --timeout 600000 --include conformance
- name: Check formatting
run: mix format --check-formatted
if: ${{ matrix.check_format }}
- name: Check dependencies
run: mix deps.unlock --check-unused
if: ${{ matrix.check_deps }}
- name: Credo
run: mix credo
- name: Dialyzer
run: mix dialyzer --format github
if: ${{ matrix.dialyzer }}
# Signal Coveralls that all parallel jobs finished so it can merge results
coveralls-finish:
runs-on: ubuntu-24.04
needs: build
if: always()
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
fail-on-error: false