-
Notifications
You must be signed in to change notification settings - Fork 21
73 lines (63 loc) · 2.15 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: test
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
test:
runs-on: ubuntu-latest
name: Test OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
matrix:
otp: [22.x, 23.x, 24.x]
elixir: [1.11.x, 1.12.x]
services:
db:
image: postgres:13.1
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- uses: erlef/[email protected]
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Cache Dependencies
uses: actions/[email protected]
with:
path: |
deps
_build/dev
_build/test
key: elixir-cache-${{secrets.CACHE_VERSION}}-${{matrix.elixir}}-otp-${{matrix.otp}}-${{runner.os}}-${{hashFiles('mix.lock')}}-${{hashFiles('assets/package-lock.json')}}-${{github.ref}}
restore-keys: |
elixir-cache-${{secrets.CACHE_VERSION}}-${{matrix.elixir}}-otp-${{matrix.otp}}-${{runner.os}}-${{hashFiles('mix.lock')}}-${{hashFiles('assets/package-lock.json')}}-
elixir-cache-${{secrets.CACHE_VERSION}}-${{matrix.elixir}}-otp-${{matrix.otp}}-${{runner.os}}-
- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix setup.deps
- name: Set chromedriver bin path for Wallaby
run: echo "CHROMEDRIVER_BIN_PATH=$CHROMEWEBDRIVER/chromedriver" >> $GITHUB_ENV
- name: Test
env:
MIX_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/workbench_?
SECRET_KEY_BASE: ${{secrets.SECRET_KEY_BASE}}
LIVE_VIEW_SIGNING_SALT: ${{secrets.LIVE_VIEW_SIGNING_SALT}}
GUARDIAN_SECRET_KEY: ${{secrets.GUARDIAN_SECRET_KEY}}
run: |
mix tai.gen.migration
mix ecto.create
mix ecto.migrate
mix test
- name: Dialyzer
run: mix dialyzer