forked from supabase/realtime
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.58 KB
/
prod_linter.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
name: Production Formatting Checks
on:
pull_request:
branches:
- release
jobs:
format:
name: Formatting Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup elixir
id: beam
uses: erlef/setup-beam@v1
with:
otp-version: 26.x # Define the OTP version [required]
elixir-version: 1.16.x # Define the elixir version [required]
- name: Cache Mix
uses: actions/cache@v1
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Set up Postgres
run: docker compose -f docker-compose.dbs.yml up -d
- name: Run database migrations
run: mix ecto.migrate
- name: Run format check
run: mix format --check-formatted
- name: Credo checks
run: mix credo --strict --mute-exit-status
- name: Retrieve PLT Cache
uses: actions/cache@v1
id: plt-cache
with:
path: priv/plts
key: ${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-plts-${{ 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.build
- name: Run dialyzer
run: mix dialyzer
- name: Run tests
run: mix test