-
Notifications
You must be signed in to change notification settings - Fork 3
94 lines (81 loc) · 2.22 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
94
---
name: Elixir SDK
on:
push:
branches:
- main
paths:
- 'elixir-sdk/**'
- 'eppo_core/**'
pull_request:
paths:
- 'elixir-sdk/**'
- 'eppo_core/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
elixir_test:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
include:
# Elixir 1.18 with OTP 26 and 27
- os: ubuntu
elixir: '1.18'
otp: '26.0'
- os: ubuntu
elixir: '1.18'
otp: '27.0'
# Elixir 1.17 with OTP 26 and 27
- os: ubuntu
elixir: '1.17'
otp: '26.0'
- os: ubuntu
elixir: '1.17'
otp: '27.0'
# Elixir 1.16 with OTP 26 only
- os: ubuntu
elixir: '1.16'
otp: '26.0'
# Elixir 1.15 with OTP 26 only
- os: ubuntu
elixir: '1.15'
otp: '26.0'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Elixir & Rust
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Cache Mix dependencies
uses: actions/cache@v3
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- run: npm ci
- name: Override eppo_core for testing
run: |
mkdir -p ~/.cargo/
echo "[patch.crates-io.eppo_core]" >> "${CARGO_HOME:-$HOME/.cargo}/config.toml"
echo "path = '$PWD/eppo_core'" >> "${CARGO_HOME:-$HOME/.cargo}/config.toml"
- name: Install dependencies
run: mix deps.get
working-directory: elixir-sdk
- name: Compile
run: mix compile
working-directory: elixir-sdk
- name: Run tests
run: npm run with-server test:elixir