-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (71 loc) · 2.07 KB
/
elixir.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
name: Elixir CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
env:
MIX_ENV: test
ImageOS: ubuntu22
jobs:
build:
name: Build and test
runs-on: ubuntu-22.04
strategy:
matrix:
elixir_version: ['1.12', '1.13', '1.14', '1.15', '1.16', '1.17']
otp_version: ['24', '25', '26', '27']
exclude:
- elixir_version: '1.12'
otp_version: '25'
- elixir_version: '1.12'
otp_version: '26'
- elixir_version: '1.12'
otp_version: '27'
- elixir_version: '1.13'
otp_version: '26'
- elixir_version: '1.13'
otp_version: '27'
- elixir_version: '1.14'
otp_version: '27'
- elixir_version: '1.15'
otp_version: '27'
- elixir_version: '1.16'
otp_version: '27'
- elixir_version: '1.17'
otp_version: '24'
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir_version }} # Define the elixir version [required]
otp-version: ${{ matrix.otp_version }} # Define the OTP version [required]
env:
ImageOS: ubuntu22
- name: Restore dependencies cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Set up Postgres
run: |
sudo apt-get update
sudo apt-get install -y postgresql
sudo service postgresql start
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';"
- name: Install dependencies
run: mix deps.get
- name: Dialyzer
run: MIX_ENV=test mix dialyzer
- name: Credo
run: MIX_ENV=test mix credo
- name: Run tests
run: mix coveralls.json
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}