Skip to content

Consolidate extension API #307

Consolidate extension API

Consolidate extension API #307

Workflow file for this run

on: push
permissions:
contents: write
jobs:
checks:
name: Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
# see https://hexdocs.pm/elixir/compatibility-and-deprecations.html#between-elixir-and-erlang-otp
elixir: [1.17.3, 1.16.3, 1.15.8]
otp: [27.1.1, 26.2.5.3, 25.3.2.14]
exclude:
- elixir: 1.16.3
otp: 27.1.1
- elixir: 1.15.8
otp: 27.1.1
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: dx_test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v4
- name: Setup Erlang & Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
version-type: strict
# Caching
- name: Dependencies cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-deps-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-deps-${{ hashFiles('mix.lock') }}
- name: Build cache
uses: actions/cache@v4
with:
path: _build
key: ${{ runner.os }}-build-test-${{matrix.elixir}}-${{matrix.otp}}-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-build-test-${{matrix.elixir}}-${{matrix.otp}}-
# Setup
- name: Install dependencies
run: mix deps.get
# Checks
- name: Compiler warnings (test)
run: mix compile --warnings-as-errors --force
- name: Test suite
run: mix test || mix test --failed || mix test --failed || mix test --failed || mix test --failed
env:
WARNINGS_AS_ERRORS: "true"
- name: Code format
run: mix format --check-formatted --dry-run
docs:
name: Docs
needs: [checks]
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/docs/')
uses: ./.github/workflows/publish-docs.yml
secrets: inherit
with:
elixir_version: 1.14.4
otp_version: 25.2.3
release:
name: Release
needs: [checks]
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/v')
uses: ./.github/workflows/publish-release.yml
secrets: inherit
with:
elixir_version: 1.14.4
otp_version: 25.2.3