Skip to content

Merge pull request #42 from kshannoninnes/bug-fix/fix-broken-option-p… #137

Merge pull request #42 from kshannoninnes/bug-fix/fix-broken-option-p…

Merge pull request #42 from kshannoninnes/bug-fix/fix-broken-option-p… #137

Workflow file for this run

# Via https://github.com/Kraigie/nostrum/blob/master/.github/workflows/test_and_lint.yml
name: Test & Lint
on: [push, pull_request]
jobs:
test_and_lint:
runs-on: ubuntu-20.04
strategy:
matrix:
elixir-version: ['1.12', '1.13', '1.14']
otp-version: ['22', '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
# Only run lint and formatting jobs on latest OTP/Elixir versions.
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: 25
elixir-version: 1.14
- uses: actions/cache@v3
env:
base-key: 25-1.14
with:
path: |
_build
deps
# Generate a hash of the OTP version and Elixir version
key: ${{ env.base-key }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ env.base-key }}-mix
- run: mix deps.get
name: Fetch Dependencies
- run: mix credo --strict
name: Lint (credo)
- run: mix format --check-formatted
name: Lint (mix format)
- run: mix dialyzer
name: Run dialyzer