-
-
Notifications
You must be signed in to change notification settings - Fork 18
93 lines (77 loc) · 2.86 KB
/
elixir.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
on: push
jobs:
test:
runs-on: ubuntu-latest
services:
db:
image: postgres:11
ports: ['5432:5432']
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
elixir: [1.8.2]
otp: [22.3.1]
node: [14.15.3]
redis: [5]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis }}
- name: Setup elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: ${{ matrix.elixir }} # Define the elixir version [required]
otp-version: ${{ matrix.otp }} # Define the OTP version [required]
- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v1
id: mix-cache # id to use in retrieve action
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-
- name: Install Mix Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Retrieve PLT Cache
uses: actions/cache@v1
id: plt-cache
with:
path: priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts2-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts2-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts2-
- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mix dialyzer --plt
- name: Load list of bots for bot detection
run: mix ua_inspector.download --force
- name: Run tests without wallaby
run: mix test --exclude wallaby:true
- name: Run coveralls.github
run: MIX_ENV=test mix coveralls.github --exclude wallaby:true
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Build javascript bundle
run: cd assets && yarn install && yarn deploy