-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (71 loc) · 2.02 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
84
85
86
87
88
89
90
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Elixir CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
test:
name: Test - Lint - Dialyze
runs-on: ubuntu-latest
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
variation:
- otp: '27.x'
elixir: '1.17'
report_coverage: true
# No OTP-27 and Elixir 1.16.x support
- otp: '26.x'
elixir: '1.17'
report_coverage: false
- otp: '26.x'
elixir: '1.16'
report_coverage: false
- otp: '25.x'
elixir: '1.16'
report_coverage: false
steps:
- uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.variation.otp}}
elixir-version: ${{matrix.variation.elixir}}
- name: Install Solidity
run: |
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Start Anvil (Background)
run: anvil &
- name: Prepare for tests
run: elixir test/test_prepare.exs
- name: Run tests and report coverage
if: ${{matrix.variation.report_coverage}}
run: mix coveralls.github
- name: Run tests
if: ${{!matrix.variation.report_coverage}}
run: mix coveralls
- name: Credo
run: mix credo --strict
- name: Dialyzer
run: mix dialyzer