Remove tracing and update test matrix. #401
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test ❯ Matrix | |
description: | | |
Fully runs test suite against all supported versions of Elixir and Erlang. | |
We target all supported versions of Elixir, listed here: | |
https://hexdocs.pm/elixir/compatibility-and-deprecations.html | |
We test every supported version of Elixir against every version of Erlang it supports, documented here: | |
https://hexdocs.pm/elixir/compatibility-and-deprecations.html#between-elixir-and-erlang-otp | |
In each case, we target the latest released version of that dependency: | |
- the latest PATCH for each MINOR version of Elixir | |
- the latest MINOR version for each MAJOR version of Erlang | |
The only permutations where failures are permitted to not break the build | |
are those we have no control over, ex: versions unsupported erlef/setup-beam. | |
This action is run continuously on every commit to the `latest` and `release` branches, | |
PRs to those branches, and can be triggered manually. | |
NOTES: | |
- See the test suite workflow for quicker feedback, run on every commit. | |
on: | |
workflow_dispatch: {} | |
pull_request: | |
branches: | |
- latest | |
- release | |
push: | |
branches: | |
- release | |
- latest | |
env: | |
cache-version: 9 | |
MIX_ENV: test | |
concurrency: | |
group: test-matrix-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: Testing Matrix | |
runs-on: ubuntu-22.04 | |
continue-on-error: ${{ matrix.type == 'optional' }} | |
strategy: | |
matrix: | |
elixir: | |
- "1.15" | |
- "1.16" | |
- "1.17" | |
- "1.18" | |
otp: | |
- "25" | |
- "26" | |
type: [required] | |
include: | |
# Additional version combinations we want to check | |
# Only Elixir >= 1.17 supports OTP 27 | |
- elixir: "1.17" | |
otp: "27" | |
type: required | |
- elixir: "1.18" | |
otp: "27" | |
type: required | |
# Only Elixir <= 1.16 supports OTP 24 | |
- elixir: "1.14" | |
otp: "24" | |
type: required | |
- elixir: "1.15" | |
otp: "24" | |
type: required | |
- elixir: "1.16" | |
otp: "24" | |
type: required | |
# Only Elixir <= 1.14 supports OTP 23, but erlef/setub-beam no longer supports it | |
- elixir: "1.14" | |
otp: "23" | |
type: optional | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Erlang & Elixir | |
id: beam-versions | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Restore mix dependency installation cache | |
id: mix-deps-get-cache | |
uses: actions/cache@v4 | |
with: | |
path: deps | |
key: cache-${{ env.cache-version }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-get-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
- name: Install mix dependencies | |
if: steps.mix-deps-get-cache.outputs.cache-hit != 'true' | |
run: mix deps.get | |
- name: Restore mix dependency compilation cache | |
id: mix-deps-compile-cache | |
uses: actions/cache@v4 | |
with: | |
path: _build | |
key: cache-${{ env.cache-version }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-compile-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
- name: Compile mix dependencies | |
if: steps.mix-deps-compile-cache.outputs.cache-hit != 'true' | |
run: mix deps.compile | |
- name: Run test suite | |
run: mix test.suites | |
types: | |
name: Typechecking Matrix | |
runs-on: ubuntu-22.04 | |
continue-on-error: ${{ matrix.type == 'optional' }} | |
strategy: | |
matrix: | |
elixir: | |
- "1.15" | |
- "1.16" | |
- "1.17" | |
- "1.18" | |
otp: | |
- "25" | |
- "26" | |
type: [required] | |
include: | |
# Additional version combinations we want to check | |
# Only Elixir >= 1.17 supports OTP 27 | |
- elixir: "1.17" | |
otp: "27" | |
type: required | |
- elixir: "1.18" | |
otp: "27" | |
type: required | |
# Only Elixir <= 1.16 supports OTP 24 | |
- elixir: "1.14" | |
otp: "24" | |
type: required | |
- elixir: "1.15" | |
otp: "24" | |
type: required | |
- elixir: "1.16" | |
otp: "24" | |
type: required | |
# Only Elixir <= 1.14 supports OTP 23, but erlef/setub-beam no longer supports it | |
- elixir: "1.14" | |
otp: "23" | |
type: optional | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Erlang & Elixir | |
id: beam-versions | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Restore mix dependency installation cache | |
id: mix-deps-get-cache | |
uses: actions/cache@v4 | |
with: | |
path: deps | |
key: cache-${{ env.cache-version }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-get-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
- name: Install mix dependencies | |
if: steps.mix-deps-get-cache.outputs.cache-hit != 'true' | |
run: mix deps.get | |
- name: Restore mix dependency compilation cache | |
id: mix-deps-compile-cache | |
uses: actions/cache@v4 | |
with: | |
path: _build | |
key: cache-${{ env.cache-version }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-deps-compile-mix-lock-file-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
- name: Compile mix dependencies | |
if: steps.mix-deps-compile-cache.outputs.cache-hit != 'true' | |
run: mix deps.compile | |
- name: Restore mix typecheck cache | |
id: mix-typecheck-cache | |
uses: actions/cache@v4 | |
with: | |
path: priv/plts | |
key: cache-${{ env.cache-version }}-os-${{ runner.os }}-${{ steps.beam-versions.outputs.otp-version }}-${{ steps.beam-versions.outputs.elixir-version }}-mix-typecheck | |
- name: Setup typechecking | |
if: steps.mix-typecheck-cache.outputs.cache-hit != 'true' | |
run: mix typecheck.build-cache | |
- name: Run typecheck tasks | |
run: mix typecheck | |
results: | |
name: Test Matrix Action Results | |
runs-on: ubuntu-22.04 | |
if: ${{ always() }} | |
needs: | |
- tests | |
- types | |
steps: | |
- name: Test Suite Succeeded | |
if: ${{ needs.tests.result == 'success' && needs.types.result == 'success' }} | |
run: exit 0 | |
- name: Test Suite Failed | |
if: ${{ needs.tests.result == 'failure' || needs.types.result == 'failure' }} | |
run: exit 1 |