-
Notifications
You must be signed in to change notification settings - Fork 28
42 lines (39 loc) · 1.37 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
name: Runs on master branch or on open pull requests that are ready for review
on:
push:
branches:
- master
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
env:
COMMIT_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
BRANCH: ${{ github.event_name == 'pull_request' && format('refs/heads/{0}', github.event.pull_request.head.ref) || github.ref }}
jobs:
test:
# This condition ensures that this job will not run on pull requests in draft state
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
otp: [24, 25, 26]
elixir: [1.15]
runs-on: ${{matrix.os}}
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} (${{matrix.os}})
steps:
- uses: actions/checkout@v4
with:
ref: ${{env.BRANCH}}
- uses: erlef/[email protected]
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Install Dependencies
run: mix deps.get
- name: Check formatting
run: mix format --check-formatted
- name: Check style
run: mix credo --format flycheck
- name: Compile project
run: mix compile --warnings-as-errors
- name: Run tests
run: mix test --cover