Skip to content

Commit

Permalink
GitHub workflow CI (lau#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
lau authored Jun 12, 2023
1 parent 4351fa8 commit 830f445
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI

on:
pull_request:
push:
branches:
- main
- ci-test-ghwf

jobs:
test:
runs-on: ubuntu-22.04
env:
MIX_ENV: test

strategy:
fail-fast: false
matrix:
include:
- pair:
elixir: 1.14.2
otp: 25.0
lint: lint

steps:
- uses: actions/checkout@v2

- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.pair.otp }}
elixir-version: ${{ matrix.pair.elixir }}

- name: Install dependencies
run: mix do deps.get --only $MIX_ENV, deps.compile

- name: Check that there are no unused dependencies in mix.lock
run: mix deps.get && mix deps.unlock --check-unused
if: ${{ matrix.lint }}

- name: Compile with --warnings-as-errors
run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}

- name: Run tests
run: mix test

test_older_elixir:
runs-on: ubuntu-20.04
env:
MIX_ENV: test
strategy:
fail-fast: false
matrix:
include:
- pair:
elixir: 1.8.1
otp: 20.0
steps:
- uses: actions/checkout@v2

- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.pair.otp }}
elixir-version: ${{ matrix.pair.elixir }}

- name: Install dependencies
run: mix do deps.get --only $MIX_ENV, deps.compile

- name: Run tests
run: mix test

0 comments on commit 830f445

Please sign in to comment.