forked from asummers/erlex
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a8b8ad
commit 94fc7fe
Showing
1 changed file
with
121 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
name: Test ❯ Edge | ||
# Runs tests against edge versions of Erlang/OTP and Elixir | ||
# to get ahead of incompatible changes. | ||
|
||
on: | ||
# Allow running from GitHub UI. | ||
workflow_dispatch: {} | ||
|
||
# Run daily. | ||
schedule: | ||
- cron: 0 0 * * * | ||
|
||
env: | ||
edge-elixir: "master" | ||
edge-otp: "x" | ||
MIX_ENV: test | ||
|
||
concurrency: | ||
group: test-edge-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
tests: | ||
name: Testing Edge | ||
runs-on: ${{ vars.PREFERRED_OS }} | ||
|
||
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 | ||
|
||
types: | ||
# Skip type checking for now | ||
if: ${{ !always() }} | ||
name: Typechecking Edge | ||
runs-on: ${{ vars.PREFERRED_OS }} | ||
|
||
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 typecheck tasks | ||
run: mix typecheck | ||
|
||
lints: | ||
name: Linting Edge | ||
runs-on: ${{ vars.PREFERRED_OS }} | ||
|
||
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: ${{ vars.PREFERRED_OS }} | ||
|
||
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 |