Adds GitHub Actions. #1
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
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Build & Test | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Erlang and Elixir | |
uses: erlef/[email protected] | |
with: | |
elixir-version: "1.16.0-otp-26" | |
otp-version: "26.0" | |
- name: Mix and build cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
deps | |
_build | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Get Dependencies | |
run: mix deps.get | |
- name: Build Project | |
run: | | |
mix compile --warnings-as-errors | |
- name: Run Tests | |
run: | | |
mix test |