Skip to content

Merge pull request #472 from Kraigie/remove-genstage #753

Merge pull request #472 from Kraigie/remove-genstage

Merge pull request #472 from Kraigie/remove-genstage #753

Workflow file for this run

name: Test & Lint
on:
push:
branches:
- master
pull_request:
jobs:
# Only run lint and formatting jobs on latest OTP/Elixir versions.
lint:
name: Lint with Credo and Mix Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: 24
elixir-version: 1.13
- uses: actions/cache@v2
with:
path: _build
# Generate a hash of the OTP version and Elixir version
key: 24-1.12-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: 24-1.12-mix
- run: mix deps.get
name: Fetch Dependencies
- run: mix credo --strict
name: Lint (credo)
- run: mix format --check-formatted
name: Lint (mix format)
test:
name: Run Unit tests
runs-on: ubuntu-20.04
strategy:
matrix:
elixir-version: ['1.11', '1.12', '1.13', '1.14']
otp-version: ['23', '24', '25']
exclude:
- elixir-version: '1.11'
otp-version: '24'
- elixir-version: '1.11'
otp-version: '25'
- elixir-version: '1.12'
otp-version: '25'
- elixir-version: '1.14'
otp-version: '22'
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp-version }}
elixir-version: ${{ matrix.elixir-version }}
- uses: actions/cache@v2
with:
path: _build
# Generate a hash of the OTP version and Elixir version
key: ${{ matrix.otp-version }}-${{ matrix.elixir-version }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: ${{ matrix.otp-version }}-${{ matrix.elixir-version }}-mix
- run: mix deps.get
name: Fetch Dependencies
- run: mix test --no-start
name: Run Tests