Skip to content

Clean elixir

Clean elixir #71

Workflow file for this run

---
name: Test
on:
push:
branches:
- "main"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
otp: ['24', '25', '26', '27']
elixir: ['1.13.4', '1.14.5', '1.15.7', '1.16.3', '1.17.2']
# https://hexdocs.pm/elixir/compatibility-and-deprecations.html
exclude:
- otp: '24'
elixir: '1.17.2'
- otp: '27'
elixir: '1.16.3'
- otp: '27'
elixir: '1.15.7'
- otp: '27'
elixir: '1.14.5'
- otp: '26'
elixir: '1.14.5'
- otp: '27'
elixir: '1.13.4'
- otp: '26'
elixir: '1.13.4'
env:
MIX_ENV: test
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Install Erlang and Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
# Could be 'latest'
rebar3-version: '3.23.0'
- name: Retrieve cached deps
uses: actions/cache@v4
with:
path: _build
key: ${{ matrix.otp }}-${{ matrix.elixir}}-${{ hashFiles('**/rebar.lock') }}
restore-keys: ${{ matrix.otp }}-${{ matrix.elixir }}-
# Force full recompile on builds that are retried.
- name: Clean deps to avoid flaky incremental builds
working-directory: app
if: github.run_attempt != '1'
run: rm -rf _build
- name: Check formatting
run: rebar3 format -v
- name: Run Erlang tests
run: rebar3 ct
- name: Cache deps
working-directory: mix_tests
id: cache-deps
uses: actions/cache@v4

Check failure on line 72 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / Test

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 72, Col: 9): Unexpected value 'uses' .github/workflows/test.yml (Line: 75, Col: 9): Unexpected value 'with'
env:
cache-name: cache-elixir-deps
with:
path: app/deps
key: ${{ runner.os }}-${{matrix.otp}}-${{matrix.elixir}}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-${{matrix.otp}}-${{matrix.elixir}}-mix-${{ env.cache-name }}-
- name: Cache compiled build
working-directory: mix_tests
id: cache-build
uses: actions/cache@v4
env:
cache-name: cache-compiled-build
with:
path: app/_build
key: ${{ runner.os }}-${{matrix.otp}}-${{matrix.elixir}}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-${{matrix.otp}}-${{matrix.elixir}}-mix-${{ env.cache-name }}-
- name: Install Elixir tools
working-directory: mix_tests
run: mix do local.rebar --force, local.hex --force
# Force full recompile on builds that are retried.
- name: Clean deps to avoid flaky incremental builds
working-directory: mix_tests
if: github.run_attempt != '1'
run: |
mix deps.clean --all
mix clean
shell: sh
- name: Get Elixir deps
working-directory: mix_tests
run: mix deps.get
- name: Run Elixir tests
working-directory: mix_tests
run: mix test
- name: Run static code analysis checks
run: rebar3 dialyzer