ci: add pull request validation workflow

This commit is contained in:
Matt Franczak 2023-12-13 12:22:35 -06:00
parent 50a2e322f9
commit abb2d88f31

42
.github/workflows/pr.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: PR
on: [pull_request]
jobs:
Validate:
runs-on: ubuntu-latest
name: Validate OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
matrix:
elixir:
- 1.15
otp:
- 26.1
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- uses: actions/cache@v3
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install Dependencies
run: mix deps.get
- name: Check Format
run: mix format --check-formatted
- name: Compile
run: mix compile --all-warnings --warnings-as-errors
- name: Test
run: mix test