chore: improve CI #84
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: Run Tests | |
on: | |
- push | |
- pull_request | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
container: archlinux:base-devel | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get Deps Cache | |
uses: actions/cache@v2 | |
id: cache-deps | |
with: | |
path: deps/ | |
key: ${{hashFiles('mix.lock')}}-deps | |
- name: Get Build Cache | |
uses: actions/cache@v2 | |
with: | |
path: _build/ | |
key: ${{runner.os}}-${{hashFiles('mix.lock')}}-build | |
- name: Arch install deps | |
run: | | |
pacman --noconfirm -Sy elixir raylib git clang pkg-config | |
mix local.rebar --force | |
mix local.hex --force | |
- name: Get deps | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: | | |
mix deps.get | |
- name: Compile | |
run: mix compile --warnings-as-errors | |
- name: Check Tests | |
run: mix test | |
- name: Check Credo | |
run: mix credo --strict | |
- name: Check Format | |
run: mix format --check-formatted | |
- name: Check Dialyzer | |
run: mix dialyzer | |
- name: Check 3D Picking example | |
run: | | |
cd examples/3d_picking | |
mix deps.get | |
mix compile --warnings-as-errors | |
mix chedo --scrict | |
mix format --check-formatted | |
mix dialyzer | |
cd ../.. | |
- name: Check Scale Rectangle example | |
run: | | |
cd examples/scale_rectangle | |
mix deps.get | |
mix compile --warnings-as-errors | |
mix chedo --scrict | |
mix format --check-formatted | |
mix dialyzer | |
cd ../.. |