-
-
Notifications
You must be signed in to change notification settings - Fork 424
56 lines (51 loc) · 1.56 KB
/
beacon_tests.yml
File metadata and controls
56 lines (51 loc) · 1.56 KB
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
name: Beacon Tests
defaults:
run:
shell: bash
working-directory: ./beacon
on:
pull_request:
paths:
- "beacon/**"
- ".github/workflows/beacon_tests.yml"
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
MIX_ENV: test
jobs:
tests:
name: Tests & Lint
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
- name: Setup elixir
id: beam
uses: erlef/setup-beam@v1
with:
otp-version: 27.x # Define the OTP version [required]
elixir-version: 1.18.x # Define the elixir version [required]
- name: Cache Mix
uses: useblacksmith/cache@v5
with:
path: |
beacon/deps
beacon/_build
key: ${{ github.workflow }}-${{ runner.os }}-mix-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-${{ hashFiles('beacon/mix.lock') }}
restore-keys: |
${{ github.workflow }}-${{ runner.os }}-mix-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-
- name: Install dependencies
run: mix deps.get
- name: Start epmd
run: epmd -daemon
- name: Run tests
run: MIX_ENV=test mix test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check for warnings
run: mix compile --force --warnings-as-errors
- name: Run format check
run: mix format --check-formatted