-
Notifications
You must be signed in to change notification settings - Fork 107
128 lines (109 loc) · 2.58 KB
/
ci.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
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Elixir ${{ matrix.elixir }}
runs-on: ubuntu-latest
container:
image: elixir:${{ matrix.elixir }}
strategy:
fail-fast: false
matrix:
elixir:
- '1.17'
- '1.16'
- '1.15'
- '1.14'
- '1.13'
- '1.12'
- '1.11'
- '1.10'
- '1.9'
- '1.8'
- '1.7'
steps:
- uses: actions/checkout@v3
- name: Setup Environment
run: |
epmd -daemon
mix local.hex --force
mix local.rebar --force
mix deps.get
- name: Run Tests
run: mix test --trace
bench:
if: github.ref == 'refs/heads/main'
name: Benchmark
runs-on: ubuntu-latest
container:
image: elixir:1.17
steps:
- uses: actions/checkout@v3
- name: Setup Environment
run: |
epmd -daemon
mix local.hex --force
mix local.rebar --force
mix deps.get
- name: Run Benchmarks
run: mix bench
coverage:
name: Coverage
runs-on: ubuntu-latest
container:
image: elixir:1.17
env:
MIX_ENV: cover
steps:
- uses: actions/checkout@v3
- name: Setup Environment
run: |
epmd -daemon
mix local.hex --force
mix local.rebar --force
mix deps.get
- name: Generate Coverage
run: mix coveralls.github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docs:
name: Documentation
runs-on: ubuntu-latest
container:
image: elixir:1.17
steps:
- uses: actions/checkout@v3
- name: Setup Environment
run: |
epmd -daemon
mix local.hex --force
mix local.rebar --force
mix deps.get
- name: Build Documentation
run: |
mix docs 2>&1 | tee output.txt
! grep warning output.txt
mv docs/overview.md docs/overview.md.1
mix run scripts/overview.exs
diff docs/overview.md docs/overview.md.1 > /dev/null 2>&1
lint:
name: Linting
runs-on: ubuntu-latest
container:
image: elixir:1.17
steps:
- uses: actions/checkout@v3
- name: Setup Environment
run: |
epmd -daemon
mix local.hex --force
mix local.rebar --force
mix deps.get
- name: Validate Formatting
run: mix format --check-formatted
- name: Validate Linting
run: mix credo --all --format=oneline