forked from coryodaniel/speakeasy
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.42 KB
/
build.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
name: build
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
env:
CACHE_VERSION: 1
jobs:
lint:
runs-on: ubuntu-latest
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
matrix:
otp: ['25.0']
elixir: ['1.13.4', '1.14.2']
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: 'deps cache'
uses: actions/cache@v3
with:
path: deps
key: lint-deps-${{env.CACHE_VERSION}}-${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
lint-deps-${{env.CACHE_VERSION}}-${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
lint-deps-${{env.CACHE_VERSION}}-${{ runner.os }}-mix-
lint-deps-${{env.CACHE_VERSION}}-
- name: '_build cache'
uses: actions/cache@v3
with:
path: _build
key: lint-build-${{env.CACHE_VERSION}}-${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
lint-build-${{env.CACHE_VERSION}}-${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
lint-build-${{env.CACHE_VERSION}}-${{ runner.os }}-mix-
lint-build-${{env.CACHE_VERSION}}-
- run: mix deps.get
- run: mix format --check-formatted
- run: mix test