-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added elixir CI test based on expublish workflow (#55)
* added elixir CI test based on expublish workflow * removed config.exs as it had no useful defaults and was not compatible with Elixir < 1.10 * adjusting CI to check elixir >1.10
- Loading branch information
Showing
5 changed files
with
81 additions
and
38 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,74 @@ | ||
name: Elixir CI | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
name: Build and test ${{ matrix.elixir }} / OTP ${{ matrix.otp }} | ||
runs-on: ubuntu-20.04 | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MIX_ENV: test | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- elixir: '1.10' | ||
otp: '22.3' | ||
- elixir: '1.15' | ||
otp: '25.3' | ||
- elixir: '1.15' | ||
otp: '26.0' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Elixir | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
elixir-version: ${{ matrix.elixir }} | ||
otp-version: ${{ matrix.otp }} | ||
- name: Restore dependency cache | ||
uses: actions/[email protected] | ||
id: deps-cache | ||
with: | ||
path: deps | ||
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix- | ||
- name: Restore build cache | ||
uses: actions/[email protected] | ||
with: | ||
path: _build | ||
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build- | ||
# - name: Restore plt cache | ||
# uses: actions/[email protected] | ||
# id: plt-cache | ||
# with: | ||
# path: priv/plts | ||
# key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles('**/mix.lock') }} | ||
# restore-keys: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts- | ||
- name: Install dependencies | ||
if: steps.deps-cache.outputs.cache-hit != 'true' | ||
run: mix deps.get | ||
- name: Compile application | ||
run: mix compile | ||
# - name: Create plts | ||
# if: steps.plt-cache.outputs.cache-hit != 'true' | ||
# run: | | ||
# mkdir -p priv/plts | ||
# mix dialyzer --plt | ||
# - name: Run static code analysis (dialyzer) | ||
# run: mix dialyzer --no-check | ||
# - name: Run static code analysis (credo) | ||
# run: mix credo --strict | ||
- name: Run tests | ||
run: mix test | ||
- name: Run tests and coverage | ||
if: matrix.elixir == '1.15' && matrix.otp == '26.0' | ||
run: mix coveralls.github |
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 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