-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Swap to Github Actions * update * mix format * add dialyzer
- Loading branch information
1 parent
e25b838
commit ff79c38
Showing
8 changed files
with
94 additions
and
25 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,73 @@ | ||
name: Elixir CI | ||
|
||
on: push | ||
|
||
env: | ||
MIX_ENV: test | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
elixir: ["1.13", "1.14", "1.15"] | ||
otp: ["25", "26"] | ||
exclude: | ||
- elixir: 1.13 | ||
otp: 26 | ||
- elixir: 1.14 | ||
otp: 26 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup elixir | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
elixir-version: ${{ matrix.elixir }} | ||
otp-version: ${{ matrix.otp }} | ||
|
||
- name: Restore dependencies cache | ||
uses: actions/cache@v3 | ||
id: mix-cache | ||
with: | ||
path: deps | ||
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.mix-cache.outputs.cache-hit != 'true' | ||
run: | | ||
mix local.rebar --force | ||
mix local.hex --force | ||
mix deps.get | ||
- name: Compile & error on warning | ||
run: mix compile --warnings-as-errors | ||
|
||
- name: Check formatting | ||
run: mix format --check-formatted | ||
|
||
- name: Run credo | ||
run: mix credo --strict | ||
|
||
- name: Retrieve PLT cache | ||
uses: actions/cache@v3 | ||
id: plt-cache | ||
with: | ||
path: priv/plts | ||
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | ||
|
||
- name: Create PLTs | ||
if: steps.plt-cache.outputs.cache-hit != 'true' | ||
run: | | ||
mkdir -p priv/plts | ||
mix dialyzer --plt | ||
- name: Run dialyzer | ||
run: mix dialyzer --no-check --halt-exit-status | ||
|
||
- name: Run tests | ||
run: mix coveralls.github |
This file was deleted.
Oops, something went wrong.
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
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
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