test lower caser... smh #17
This file contains hidden or 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: | |
pull_request: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
issues: read | |
checks: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
container: hexpm/elixir:1.18.3-erlang-27.3.3-debian-bookworm-20250407-slim | |
env: | |
# Avoid accidental recompilations | |
MIX_ENV: test | |
steps: | |
- name: Install Tools | |
run: apt update && apt install --no-install-recommends --yes build-essential git | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Fetch Hex Cache | |
uses: actions/cache@v4 | |
id: hex-cache | |
with: | |
path: | | |
deps | |
_build | |
key: ${{ runner.os }}-mix-${{ hashFiles('mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix- | |
- name: Run Tests | |
run: | | |
mix local.hex --force | |
mix local.rebar --force | |
git config --global --add safe.directory '*' | |
mix deps.get | |
mix compile --warnings-as-errors | |
mix test | |
- name: Publish Results | |
uses: mikepenz/action-junit-report@v5 | |
if: ${{ failure() }} | |
with: | |
check_name: Test Results | |
report_paths: _build/test/lib/together/*.xml | |
style: | |
name: Style | |
runs-on: ubuntu-latest | |
container: hexpm/elixir:1.18.3-erlang-27.3.3-debian-bookworm-20250407-slim | |
env: | |
# Avoid accidental recompilations | |
MIX_ENV: test | |
steps: | |
- name: Install Tools | |
run: apt update && apt install --no-install-recommends --yes build-essential git | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Fetch Hex Cache | |
uses: actions/cache/restore@v4 | |
id: hex-cache | |
with: | |
path: | | |
deps | |
_build | |
key: ${{ runner.os }}-mix-${{ hashFiles('mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix- | |
- name: Fetch PLT Cache | |
uses: actions/cache@v4 | |
with: | |
key: ${{ runner.os }}-plt-${{ hashFiles('mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-plt- | |
path: | | |
priv/plts | |
- name: Install | |
run: | | |
mix local.hex --force | |
mix local.rebar --force | |
git config --global --add safe.directory '*' | |
mix deps.get | |
- name: Check Unused Dependencies | |
run: mix deps.unlock --check-unused | |
- name: Check Formatting | |
run: mix format --check-formatted | |
if: always() | |
- name: Check Credo | |
run: mix credo | |
if: always() | |
- name: Run Dialyzer | |
# Two formats are included for ease of debugging and it is lightly recommended to use both, see https://github.com/jeremyjh/dialyxir/issues/530 for reasoning | |
# --format github is helpful to print the warnings in a way that GitHub understands and can place on the /files page of a PR | |
# --format dialyxir allows the raw GitHub actions logs to be useful because they have the full warning printed | |
run: mix dialyzer --format github --format dialyxir | |
if: always() |