Use cpjk/canary for latest master #5
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
name: CI | |
on: | |
push: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
mix_test: | |
name: mix test (OTP ${{matrix.otp}} | Elixir ${{matrix.elixir}}) | |
strategy: | |
matrix: | |
include: | |
- elixir: "1.18" | |
otp: "27.2" | |
- elixir: "1.14" | |
otp: "25.3" | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Erlang and Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
elixir-version: ${{ matrix.elixir }} | |
- name: Restore deps and _build cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
deps | |
_build | |
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} | |
- name: Install dependencies | |
run: mix deps.get --only test | |
- name: Remove compiled application files | |
run: mix clean | |
- name: Compile & lint dependencies | |
run: mix compile --warnings-as-errors | |
env: | |
MIX_ENV: test | |
- name: Run tests | |
run: mix test |