Skip to content

Commit

Permalink
CI housekeeping
Browse files Browse the repository at this point in the history
List of changes:
- add min and max Elixir/Erlang matrix
- add more CI tasks
- bump GitHub actions
  • Loading branch information
kianmeng committed Aug 13, 2024
1 parent ff7fac3 commit 34808f3
Showing 1 changed file with 38 additions and 17 deletions.
55 changes: 38 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,47 @@ on:

jobs:
build:
name: Build and test
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- pair:
elixir: 1.14.x
otp: 23.x
- pair:
elixir: 1.17.x
otp: 27.x
lint: lint


steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Elixir
uses: erlef/setup-beam@v1
- uses: erlef/setup-beam@v1
with:
otp-version: "25.3"
elixir-version: "1.14"
otp-version: ${{matrix.pair.otp}}
elixir-version: ${{matrix.pair.elixir}}

- name: Restore dependencies cache
uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-

- name: Install dependencies
run: mix deps.get
- name: Run tests
run: mix test
path: |
deps
_build
key: ${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-
- run: mix deps.get

- run: mix format --check-formatted
if: ${{ matrix.lint }}

- run: mix deps.get && mix deps.unlock --check-unused
if: ${{ matrix.lint }}

- run: mix deps.compile

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

- run: mix test

0 comments on commit 34808f3

Please sign in to comment.