Rewrite the whole project (lol) #36
Workflow file for this run
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: Elixir CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
container: elixir:${{ matrix.elixir_version }}-slim | |
strategy: | |
matrix: | |
elixir_version: ["1.13", "1.14"] | |
env: | |
MIX_ENV: test | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Install packages | |
run: | | |
apt-get update | |
# Needed for coveralls | |
apt-get install -y git | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Get deps cache | |
uses: actions/cache@v3 | |
id: mix-cache | |
with: | |
path: | | |
_build/test | |
deps | |
key: ${{ runner.os }}-${{ matrix.elixir_version }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
- name: Install Mix tools | |
run: | | |
mix local.hex --force | |
mix local.rebar --force | |
- name: Install Dependencies | |
if: steps.mix-cache.outputs.cache-hit != 'true' | |
run: | | |
mix deps.get | |
mix compile | |
- name: Run Tests | |
run: mix test --trace | |
- name: Check Formatting | |
run: mix format --dry-run --check-formatted | |
# - name: Run Credo | |
# run: mix credo --strict | |
- name: Post Coverage | |
run: mix coveralls.github |