Skip to content

docs: update toolchain references to Elixir 1.20 / OTP 29 #105

docs: update toolchain references to Elixir 1.20 / OTP 29

docs: update toolchain references to Elixir 1.20 / OTP 29 #105

Workflow file for this run

name: Elixir CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
name: Build and test (PG ${{ matrix.postgres }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# PostgreSQL 15+ is required: the auth profile mirror uses
# `security_invoker` views (added in PG15).
postgres: [ '15', '16', '17' ]
services:
postgres:
# postgis/postgis = the official postgres image + the PostGIS extension,
# required by the geo+json conformance cases (mix bier.fixtures.load
# runs CREATE EXTENSION postgis).
image: postgis/postgis:${{ matrix.postgres }}-3.5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
# Wait for the server to accept connections before the job runs.
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
# config/test.exs reads these; the `mix test` alias runs
# `mix bier.fixtures.load`, which connects to localhost:5432 and loads
# spec/conformance/fixtures.sql into a fresh `bier_test`.
PGHOST: localhost
PGPORT: '5432'
PGUSER: postgres
PGPASSWORD: postgres
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0
with:
elixir-version: '1.20'
otp-version: '29'
- name: Restore dependencies cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-otp29-elixir1.20-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-otp29-elixir1.20-mix-
- name: Install dependencies
run: mix deps.get
- name: Check unused dependencies
run: mix deps.unlock --check-unused
- name: Check formatting
run: mix format --check-formatted
- name: Compile (warnings as errors)
run: mix compile --warnings-as-errors
- name: Lint (credo)
run: mix credo --strict
- name: Build docs (warnings as errors)
run: mix docs --warnings-as-errors
- name: Run tests
# The `test` alias loads spec/conformance/fixtures.sql into `bier_test`
# (via psql, preinstalled on the runner) before running ExUnit. The full
# suite passes; any failure fails the job.
run: mix test
# Last so that newly published advisories against locked deps (which need
# a `mix deps.update` to clear) still fail the job without also hiding
# the compile/lint/docs/test results for the change under review.
- name: Audit Hex dependencies
run: mix hex.audit