Test ❯ Edge #963
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 | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: 0 0 * * * | |
env: | |
edge-elixir: "master" | |
edge-otp: "x" | |
cache-version: 3 | |
MIX_ENV: test | |
concurrency: | |
group: test-edge-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: Testing Edge | |
runs-on: ubuntu-20.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-20.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-20.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-20.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 |