Repository navigation
87 lines (73 loc) · 3.21 KB
/
Copy pathci.yml
File metadata and controls
87 lines (73 loc) · 3.21 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
# One job, secret-free, and Latu's shape with two steps removed: there are no data fixtures to
# build here and no oracle to run, because the goldens are committed under `test/wire/`. Every
# command is one a contributor runs locally — the workflow adds caching and ordering, nothing
# else. `mix check.all` is a superset of `mix check` (CONTRIBUTING.md), so there is no cheap
# tier to split off.
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# No MIX_ENV: `mix check.all` sets its own (mix.exs `preferred_envs`), and the `mix docs` it
# ends with re-enters dev, where ex_doc lives. Each step runs in the env it would locally.
jobs:
ci:
name: mix check.all
runs-on: ubuntu-24.04
# The suite is seconds; the two Spark cold starts and the guides are not. The guides fit
# thirteen models between them under a 300 s module timeout, on four cores rather than ten.
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
# Start the JVMs first and come back for them: the cold starts overlap with the BEAM
# setup below instead of following it. Both containers, fresh per run — the reattach
# server holds abandoned executions by design, so nothing is reused across runs.
- run: docker compose up -d
# Elixir/OTP come from .tool-versions — one home for the pin, shared with asdf/mise
# locally. CI is the only place the 1.20 type checker runs besides the maintainer's
# machine, so the pin is exact.
- uses: erlef/setup-beam@v1
with:
version-file: .tool-versions
version-type: strict
- uses: actions/cache@v6
with:
path: |
deps
_build
key: mix-${{ runner.os }}-${{ hashFiles('.tool-versions', 'mix.lock') }}
restore-keys: mix-${{ runner.os }}-
- run: mix local.hex --force && mix local.rebar --force
- run: mix deps.get --check-locked
# The backstop for the incremental compiler: `_build` is restored from cache, and
# `warnings_as_errors` only holds for files the compiler actually touches.
- run: MIX_ENV=test mix compile --force
# Returns once both healthchecks pass (docker-compose.yml), or fails when one gives up.
- run: docker compose up -d --wait
# Ends with `mix docs --warnings-as-errors`, which is where a hidden module named in
# prose or a broken extra link turns up.
- run: mix check.all
- name: Spark logs
if: failure()
run: docker compose logs --no-color --tail=200
# The floor mix.exs promises, compiled and tested on the oldest Elixir it names, as Latu's
# own job does. No servers and no format check. Not a required check.
floor:
name: Elixir 1.18 floor
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: erlef/setup-beam@v1
with:
elixir-version: "1.18"
otp-version: "27"
- run: mix local.hex --force && mix local.rebar --force
- run: mix deps.get --check-locked
- run: MIX_ENV=test mix compile --force --warnings-as-errors
- run: mix test