-
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
Showing
1 changed file
with
61 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,61 @@ | ||
--- | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
MIX_ENV: test | ||
|
||
jobs: | ||
code_quality_and_tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- elixir: 1.17.0 | ||
erlang: 27.0.0 | ||
name: Elixir v${{ matrix.elixir }}, Erlang v${{ matrix.erlang }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: ${{ matrix.erlang }} | ||
elixir-version: ${{ matrix.elixir }} | ||
|
||
- name: Retrieve Dependencies Cache | ||
uses: actions/cache@v4 | ||
id: mix-cache | ||
with: | ||
path: | | ||
deps | ||
_build | ||
key: ${{ runner.os }}-${{ matrix.erlang }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }} | ||
|
||
- name: Install Mix Dependencies | ||
run: mix deps.get | ||
|
||
- name: Check unused dependencies | ||
run: mix deps.unlock --check-unused | ||
|
||
- name: Compile dependencies | ||
run: mix deps.compile | ||
|
||
- name: Check format | ||
run: mix format --check-formatted | ||
|
||
- name: Check application compile warnings | ||
run: mix compile --force --warnings-as-errors | ||
|
||
- name: Check Credo warnings | ||
run: mix credo | ||
|
||
- name: Run tests | ||
run: mix test |