Skip to content

Bump credo from 1.7.0 to 1.7.6 #59

Bump credo from 1.7.0 to 1.7.6

Bump credo from 1.7.0 to 1.7.6 #59

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- main
jobs:
main:
strategy:
fail-fast: false
# Test each supported Elixir minor version. For each Elixir version,
# use the latest OTP and latest of each supported OS
# https://github.com/erlef/setup-beam#compatibility-between-operating-system-and-erlangotp
# https://hexdocs.pm/elixir/1.14.0/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp
matrix:
os: [ubuntu-22.04, windows-2022]
elixir: ['1.12', '1.13', '1.14']
include:
- otp: '25'
- elixir: '1.14'
os: 'ubuntu-22.04'
primary: true
- elixir: '1.12'
otp: '24'
runs-on: ${{matrix.os}}
env:
MIX_ENV: test
steps:
# Setup
- name: Configure Git
# doctest fails on Windows without
run: git config --global core.autocrlf input
- uses: actions/checkout@v3
- id: beam
uses: erlef/setup-beam@v1
with:
elixir-version: ${{matrix.elixir}}
otp-version: ${{matrix.otp}}
- id: cache
uses: actions/cache@v3
with:
path: |
deps
_build
key: mix-${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-${{ hashFiles('**/mix.lock') }}
# Dependencies
- run: mix do deps.get --only $MIX_ENV, deps.compile
if: runner.os != 'windows'
- run: mix do deps.get --only $env:MIX_ENV, deps.compile
if: runner.os == 'windows'
# Linting
- run: mix format --check-formatted
if: matrix.primary
- run: mix do deps.get, deps.unlock --check-unused
# Ensure all dependencies are insalled before checking lock
if: matrix.primary
- run: mix credo list --min-priority 2 --format oneline
if: matrix.primary
# Compile
- run: mix compile --warnings-as-errors
if: matrix.primary
# Testing
- run: mix test --warnings-as-errors
if: ${{ ! matrix.primary }}
# Testing with coverage
- run: mix coveralls.github --warnings-as-errors --trace
if: matrix.primary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Docs
- name: Generate docs
run: |
mix docs
test -f doc/index.html && echo "doc/index.html exists."
test -f doc/Riot\ LoR.epub && echo "doc/Riot LoR.epub exists."
if: matrix.primary
# Dialyzer
# https://github.com/jeremyjh/dialyxir#github-actions
- name: Create PLTs
run: mix dialyzer --plt --format github
if: ${{ matrix.primary && steps.cache.outputs.cache-hit != 'true' }}
# `--force-check` should not be necessary here since it checks the hash
# https://github.com/jeremyjh/dialyxir/blob/231d61c77bb23f3015af87b4850fe7ebecd1e07d/lib/mix/tasks/dialyzer.ex#L250
- run: mix dialyzer --format github
if: matrix.primary