-
-
Notifications
You must be signed in to change notification settings - Fork 2
104 lines (87 loc) · 2.76 KB
/
Copy pathci.yml
File metadata and controls
104 lines (87 loc) · 2.76 KB
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
94
95
96
97
98
99
100
101
102
103
104
name: CI
on:
pull_request:
types:
- edited
- opened
- reopened
- synchronize
concurrency:
group: "CI ${{ github.head_ref || github.run_id }}"
cancel-in-progress: true
env:
MIX_ENV: test
jobs:
conventional-commits:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: webiny/action-conventional-commits@8bc41ff4e7d423d56fa4905f6ff79209a78776c7 # v1.3.0
with:
allowed-commit-types: "feat,fix,chore"
quality-assurance:
name: Quality Assurance
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports: ["5432:5432"]
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.19.x
otp: 27
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Set up Elixir
id: beam
uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore dependencies cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: deps
key: ${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix do deps.get, deps.compile
- name: Setup Event Store
env:
MIX_ENV: test
run: mix setup
- name: Run tests
run: |
epmd -daemon
mix test.all
- name: Check formatting
run: mix format --check-formatted
- name: Check compilation
run: mix compile --warnings-as-errors
- name: Analyse code
run: mix credo --strict
- name: Retrieve Dialyzer PLT cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: plt-cache
with:
path: priv/plts
key: ${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-plts-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-plts-
- name: Create Dialyzer PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix dialyzer --plt
- name: Run Dialyzer
run: mix dialyzer --no-check