-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added CI tests * Readme updated
- Loading branch information
Showing
3 changed files
with
191 additions
and
11 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,66 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
unit_tests: | ||
name: Unit tests Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}} | ||
runs-on: ubuntu-20.04 | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- elixir: "1.16" | ||
otp: "26" | ||
- elixir: "1.15" | ||
otp: "26" | ||
- elixir: "1.14" | ||
otp: "25" | ||
- elixir: "1.13" | ||
otp: "24" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Elixir | ||
uses: erlef/setup-elixir@v1 | ||
with: | ||
elixir-version: ${{ matrix.elixir }} | ||
otp-version: ${{ matrix.otp }} | ||
|
||
- name: Restore deps cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: deps | ||
key: ${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | ||
|
||
- name: Restore _build cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: ${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | ||
|
||
- name: Install deps | ||
run: mix deps.get | ||
|
||
- name: Check Formatting | ||
run: mix format --check-formatted | ||
|
||
- name: Run unit tests | ||
run: | | ||
mix clean | ||
mix test | ||
- name: Run dialyzer | ||
run: | | ||
MIX_ENV=test mix dialyzer |
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
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