-
Notifications
You must be signed in to change notification settings - Fork 56
53 lines (53 loc) · 1.54 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
---
name: build
on:
push:
branches:
- main
pull_request:
branches:
- "*"
workflow_dispatch: {}
jobs:
ci:
name: OTP ${{matrix.otp_vsn}} on ${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
matrix:
otp_vsn: ['25', '26', '27']
rebar3_vsn: ['3.24']
os: [ubuntu-24.04, windows-2022]
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
id: setup-beam
with:
otp-version: ${{matrix.otp_vsn}}
rebar3-version: ${{matrix.rebar3_vsn}}
- name: Restore _build
uses: actions/cache@v4
with:
path: _build
key: "_build-cache-for\
-os-${{runner.os}}\
-otp-${{steps.setup-beam.outputs.otp-version}}\
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\
-hash-${{hashFiles('rebar.lock')}}"
- name: Restore rebar3's cache
uses: actions/cache@v4
with:
path: ~/.cache/rebar3
key: "rebar3-cache-for\
-os-${{runner.os}}\
-otp-${{steps.setup-beam.outputs.otp-version}}\
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\
-hash-${{hashFiles('rebar.lock')}}"
- name: Format check
if: ${{ matrix.os == 'ubuntu-24.04' && matrix.otp_vsn == '26' }}
run: rebar3 format --verify
- name: Run test
run: rebar3 test
- name: Run elvis on elvis
run: |
rebar3 escriptize
_build/default/bin/elvis_core