-
Notifications
You must be signed in to change notification settings - Fork 8
73 lines (59 loc) · 1.56 KB
/
test.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
name: Run Tests
on:
- push
- pull_request
jobs:
tests:
runs-on: ubuntu-latest
container: archlinux:base-devel
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Deps Cache
uses: actions/cache@v4
id: cache-deps
with:
path: deps/
key: ${{hashFiles('mix.lock')}}-deps
- name: Get Build Cache
uses: actions/cache@v4
with:
path: _build/
key: ${{runner.os}}-${{hashFiles('mix.lock')}}-build
- name: Arch install deps
run: |
pacman --noconfirm -Sy elixir raylib git clang pkg-config
mix local.rebar --force
mix local.hex --force
- name: Get deps
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
mix deps.get
- name: Compile
run: mix compile --warnings-as-errors
- name: Check Tests
run: mix test
- name: Check Credo
run: mix credo --strict
- name: Check Format
run: mix format --check-formatted
- name: Check Dialyzer
run: mix dialyzer
- name: Check 3D Picking example
run: |
cd examples/3d_picking
mix deps.get
mix compile --warnings-as-errors
mix credo --strict
mix format --check-formatted
mix dialyzer --force-check
cd ../..
- name: Check Scale Rectangle example
run: |
cd examples/scale_rectangle
mix deps.get
mix compile --warnings-as-errors
mix credo --strict
mix format --check-formatted
mix dialyzer --force-check
cd ../..