-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from crertel/46-move-to-github-actions
Add Github CI.
- Loading branch information
Showing
3 changed files
with
73 additions
and
66 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# cribbed from Scenic | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
MIX_ENV: test | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- elixir: '1.15.7' | ||
otp: '25.3' | ||
- elixir: '1.16.3' | ||
otp: '26.2' | ||
- elixir: '1.17.2' | ||
otp: '26.2' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: ${{matrix.otp}} | ||
elixir-version: ${{matrix.elixir}} | ||
|
||
- name: Cache build artifacts | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.hex | ||
~/.mix | ||
_build | ||
priv/plts | ||
key: ${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | ||
- name: Install Dependencies | ||
run: | | ||
mix local.rebar --force | ||
mix local.hex --force | ||
mix deps.get | ||
- name: Compile Deps | ||
run: mix deps.compile | ||
- name: Compile | ||
run: mix compile --warnings-as-errors | ||
- name: Check formatting | ||
run: mix format --check-formatted | ||
if: startsWith(matrix.elixir, '1.15') | ||
- name: Run Tests | ||
run: mix test | ||
- name: Run coverage | ||
run: mix coveralls.github | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Run credo | ||
# run: mix credo suggest --min-priority=high --ignore-checks Credo.Check.Design.DuplicatedCode |
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