-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (100 loc) · 3.26 KB
/
Copy pathci.yml
File metadata and controls
105 lines (100 loc) · 3.26 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
105
# Modified by Straw Hat, LLC in 2026.
name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
env:
ELIXIR_VERSION: 1.16.2
OTP_VERSION: 26.2
jobs:
test:
name: Build and test
runs-on: ubuntu-latest
timeout-minutes: 15
env:
EVENTSTORE_VERSION: 23.10.8
MIX_ENV: test
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Elixir and Erlang
uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.24.1
with:
elixir-version: ${{ env.ELIXIR_VERSION }}
otp-version: ${{ env.OTP_VERSION }}
- name: Cache dependencies and build
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
deps
_build
key: ${{ runner.os }}-elixir-${{ env.ELIXIR_VERSION }}-otp-${{ env.OTP_VERSION }}-test-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-elixir-${{ env.ELIXIR_VERSION }}-otp-${{ env.OTP_VERSION }}-test-
- name: Install package managers
run: |
mix local.hex --force
mix local.rebar --force
- name: Install dependencies
run: mix deps.get
- name: Compile with warnings as errors
run: mix compile --warnings-as-errors --force
- name: Run server-free tests
run: >-
mix test
test/spear/acl_test.exs
test/spear/client_test.exs
test/spear/connection/configuration_test.exs
test/spear/connection/keep_alive_timer_test.exs
test/spear/event_test.exs
test/spear/filter_test.exs
test/spear/grpc/response_test.exs
test/spear/uuid_test.exs
- name: Check formatting
run: mix format --check-formatted
- name: Run Credo
run: mix credo
- name: Build Hex package
run: mix hex.build
dialyzer:
name: Dialyzer
runs-on: ubuntu-latest
timeout-minutes: 20
env:
MIX_ENV: dev
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Elixir and Erlang
uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.24.1
with:
elixir-version: ${{ env.ELIXIR_VERSION }}
otp-version: ${{ env.OTP_VERSION }}
- name: Cache dependencies, build, and PLTs
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-elixir-${{ env.ELIXIR_VERSION }}-otp-${{ env.OTP_VERSION }}-dev-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-elixir-${{ env.ELIXIR_VERSION }}-otp-${{ env.OTP_VERSION }}-dev-
- name: Install package managers
run: |
mix local.hex --force
mix local.rebar --force
- name: Install dependencies
run: mix deps.get
- name: Run Dialyzer
run: mix dialyzer --format github
- name: Build documentation
run: mix docs --warnings-as-errors