Skip to content

CI updates (#61)

CI updates (#61) #35

Workflow file for this run

name: CI
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
env:
MIX_ENV: test
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.13.1
otp: 24.2
- elixir: 1.16.2
otp: 26.2.5
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: erlef/setup-beam@v1
id: setup-beam
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Cache build artifacts
uses: actions/cache@v4
with:
path: |
~/.hex
~/.mix
_build
deps
key: ${{ runner.os }}-otp-${{ steps.setup-beam.outputs.otp-version }}-elixir-${{ steps.setup-beam.outputs.elixir-version }}-mix-${{ hashFiles('**/mix.lock') }}
- name: Install inotify
run: sudo apt-get -qq install inotify-tools
- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Compile Deps
run: mix deps.compile
# Clean the app because we want to recompile our entire application (and the application is currently being cached in _build)
- name: Clean app
run: mix clean
- name: Compile
run: mix compile --warnings-as-errors
- name: Formatting
run: MIX_ENV=test mix format --check-formatted
- name: Run Tests
run: mix test