Test ❯ Edge #1114
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 ❯ Edge | |
description: | | |
Runs tests, typechecks, and linter on the latest and upcoming versions of Elixir, with unlocked dependencies. | |
It is not expected to always pass; rather, to keep abreast of new releases, | |
get ahead of upstream breaking changes to Elixir, and preempt incompatibilities | |
in recently published versions of dependencies. | |
This action is run daily, and can be triggered manually. | |
NOTES: | |
- See the test suite workflow for testing against our preferred versions of Elixir and Erlang. | |
- See the test matrix workflow for more comprehensive testing against all supported versions of our tools. | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: 0 0 * * * | |
env: | |
edge-elixir: "master" # TODO: use latest Elixir version, including pre-releases | |
edge-otp: "latest" # TODO: use latest Erlang version, not including pre-releases | |
cache-version: 9 | |
MIX_ENV: test | |
concurrency: | |
group: test-edge-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: Testing Edge | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Erlang & Elixir | |
id: beam-versions | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ env.edge-elixir }} | |
otp-version: ${{ env.edge-otp }} | |
- name: Unlock dependencies | |
run: mix deps.unlock --all | |
- name: Install mix dependencies | |
run: mix deps.get | |
- name: Compile mix dependencies | |
run: mix deps.compile | |
- name: Run test suite | |
run: mix test.suites | |
types: | |
name: Typechecking Edge | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Erlang & Elixir | |
id: beam-versions | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ env.edge-elixir }} | |
otp-version: ${{ env.edge-otp }} | |
- name: Unlock dependencies | |
run: mix deps.unlock --all | |
- name: Install mix dependencies | |
run: mix deps.get | |
- name: Compile mix dependencies | |
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 }}-otp-${{ steps.beam-versions.outputs.otp-versions }}-elixir-${{ steps.beam-versions.outputs.elixir-versions }}-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 | |
lints: | |
name: Linting Edge | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Erlang & Elixir | |
id: beam-versions | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ env.edge-elixir }} | |
otp-version: ${{ env.edge-otp }} | |
- name: Unlock dependencies | |
run: mix deps.unlock --all | |
- name: Install mix dependencies | |
run: mix deps.get | |
- name: Compile mix dependencies | |
run: mix deps.compile | |
- name: Run linter tasks | |
run: mix lint | |
continue-on-error: true | |
results: | |
name: Test Edge Action Results | |
runs-on: ubuntu-22.04 | |
if: ${{ always() }} | |
needs: | |
- tests | |
- types | |
- lints | |
steps: | |
- name: Test Suite Succeeded | |
if: ${{ needs.tests.result == 'success' && needs.types.result == 'success' && needs.lints.result == 'success' }} | |
run: exit 0 | |
- name: Test Suite Failed | |
if: ${{ needs.tests.result == 'failure' || needs.types.result == 'failure' || needs.lints.result == 'failure' }} | |
run: exit 1 |