From abb2d88f316846562a8225283c3f9d96ff4197a2 Mon Sep 17 00:00:00 2001 From: Matt Franczak Date: Wed, 13 Dec 2023 12:22:35 -0600 Subject: [PATCH] ci: add pull request validation workflow --- .github/workflows/pr.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..fcde2b7 --- /dev/null +++ b/.github/workflows/pr.yml @@ -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 + + + + +