-
Notifications
You must be signed in to change notification settings - Fork 14
80 lines (66 loc) · 2.38 KB
/
compatibility.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
name: Compatibility
on: [push, pull_request]
jobs:
compatibility:
name: Bless
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
beam:
- elixir: "1.12.3"
otp: "24.0"
- elixir: "1.16.2"
otp: "26.2"
eventstore:
- 20.10.2
- 22.6.0
env:
MIX_ENV: test
EVENTSTORE_HOST: localhost
EVENTSTORE_VERSION: ${{ matrix.eventstore }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set the EventStoreDB version
run: sed -i 's|ghcr.io/eventstore/eventstore:ci|eventstore/eventstore:${{ matrix.eventstore }}-buster-slim|g' docker-compose.yml
- name: Spawn docker compose EventStoreDB container
run: docker compose up --detach eventstore
- name: Setup Elixir and Erlang versions
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.beam.otp }}
elixir-version: ${{ matrix.beam.elixir }}
- name: Restore the deps cache
uses: actions/cache@v4
id: deps-cache
with:
path: deps
key: ${{ runner.os }}-${{ matrix.beam.elixir }}-${{ matrix.beam.otp }}-${{ env.MIX_ENV }}-deps-mixlockhash-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-${{ matrix.beam.elixir }}-${{ matrix.beam.otp }}-${{ env.MIX_ENV }}-deps-
- name: Restore the _build cache
uses: actions/cache@v4
id: build-cache
with:
path: _build
key: ${{ runner.os }}-${{ matrix.beam.elixir }}-${{ matrix.beam.otp }}-${{ env.MIX_ENV }}-build-mixlockhash-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-${{ matrix.beam.elixir }}-${{ matrix.beam.otp }}-${{ env.MIX_ENV }}-build-
- name: Fetch mix dependencies
if: steps.deps-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Compile dependencies
if: steps.deps-cache.outputs.cache-hit != 'true'
run: mix deps.compile
- name: Compile
run: mix compile --warnings-as-errors --force
- name: Test that the EventStoreDB container is alive
run: docker compose exec --no-TTY eventstore true
- name: Run tests
run: mix test --exclude version_incompatible
- name: Credo
run: mix credo