ci: add pull request validation workflow
This commit is contained in:
parent
50a2e322f9
commit
abb2d88f31
42
.github/workflows/pr.yml
vendored
Normal file
42
.github/workflows/pr.yml
vendored
Normal 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user