Skip to content

Merge pull request #745 from DougReeder/redundant #714

Merge pull request #745 from DougReeder/redundant

Merge pull request #745 from DougReeder/redundant #714

Workflow file for this run

name: lint-and-test
on: [push, workflow_dispatch]
jobs:
test-current:
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-22.04'
- 'ubuntu-24.04'
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres:10
env:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: '1.16.3-otp-25'
otp-version: '25.3.2.20'
# When changing versions, change it everywhere (check the README).
- uses: actions/cache@v4
with:
path: |
deps
_build
key: mix-${{ hashFiles('mix.lock') }}
- run: mix local.hex --force
- run: mix local.rebar --force
- run: mix deps.get
- run: mix compile --warnings-as-errors
- run: mix test
test-matrix:
# if a matrix-job with newer versions passes, advance the current versions!
continue-on-error: true
strategy:
fail-fast: false
matrix:
versions:
- elixir: '1.16.3-otp-25'
otp: '25.3.2.20'
- elixir: '1.16.3-otp-26'
otp: '26.2.5.16'
- elixir: '1.17.3-otp-25'
otp: '25.3.2.20'
- elixir: '1.17.3-otp-26'
otp: '26.2.5.16'
- elixir: '1.17.3-otp-27'
otp: '27.3.4.6'
- elixir: '1.18.4-otp-25'
otp: '25.3.2.20'
- elixir: '1.18.4-otp-26'
otp: '26.2.5.16'
- elixir: '1.18.4-otp-27'
otp: '27.3.4.6'
- elixir: '1.18.4-otp-28'
otp: '28.3.1'
os:
- 'ubuntu-22.04'
- 'ubuntu-24.04'
exclude:
- versions: # current versions; already tested above
elixir: '1.16.3-otp-25'
otp: '25.3.2.20'
os: 'ubuntu-22.04'
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres:10
env:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.versions.elixir }}
otp-version: ${{ matrix.versions.otp }}
- uses: actions/cache@v4
with:
path: |
deps
_build
key: mix-${{ hashFiles('mix.lock') }}
- run: mix local.hex --force
- run: mix local.rebar --force
- run: mix deps.get
- run: mix compile --warnings-as-errors
- run: mix test
pseudo-lint:
continue-on-error: false # `mix format` MUST be run before committing
strategy:
fail-fast: false
matrix:
versions:
- elixir: '1.16.3-otp-25'
otp: '25.3.2.20'
- elixir: '1.17.3-otp-25'
otp: '26.2.5.16'
- elixir: '1.18.4-otp-27'
otp: '27.3.4.6'
- elixir: '1.18.4-otp-28'
otp: '28.3.1'
runs-on: 'ubuntu-24.04'
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.versions.elixir }}
otp-version: ${{ matrix.versions.otp }}
- uses: actions/cache@v4
with:
path: |
deps
_build
key: mix-${{ hashFiles('mix.lock') }}
- run: mix deps.get
- run: mix format --check-formatted '{lib,priv,test,config}/**/*.{ex,exs}'