-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.88 KB
/
elixir-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
54
55
56
57
58
59
60
61
name: Elixir CI
on:
push:
branches: [main, staging]
pull_request:
branches: [main, staging]
jobs:
test:
name: Build and test
runs-on: ubuntu-20.04
strategy:
matrix:
elixir: [1.14.5, 1.15.6]
otp: [25.0, 26.0]
phoenix-live-view-version: [0.19.0, 0.20.0]
phoenix-version: [1.7.0]
env:
PHOENIX_VERSION: ${{matrix.phoenix-version}}
PHOENIX_LIVE_VIEW_VERSION: ${{matrix.phoenix-live-view-version}}
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: ./.github/actions/setup-elixir
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
phoenix-live-view-version: ${{ matrix.phoenix-live-view-version }}
phoenix-version: ${{ matrix.phoenix-version }}
- run: mix format --check-formatted
- run: mix test
- run: mix credo --strict
- run: mix compile --error-on-warnings
- name: Retrieve PLT Cache
uses: actions/cache@v3
id: plt-cache
with:
path: priv/plts
key: plts-v.2-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ matrix.phoenix-version }}-${{ matrix.phoenix-live-view-version }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix dialyzer --plt
- run: mix dialyzer
- name: Run test app tests
run: |
cd test_app
mix deps.get
mix deps | grep "phoenix "
mix test
- name: Check let warning
run: |
cd test_app
mix test --only let_warning 2> /tmp/test.output
cat /tmp/test.output
!(cat /tmp/test.output | grep -q "Using variables in HEEx templates are discouraged as they disable change tracking.")