Skip to content

Release 0.1.0

Release 0.1.0 #8

Workflow file for this run

name: CI
on:
pull_request: []
push:
branches:
- main
jobs:
compile:
name: Install deps and compile
runs-on: ${{ matrix.versions.runner-image }}
strategy:
fail-fast: false
matrix:
versions:
- otp: 21.3
elixir: 1.11
runner-image: ubuntu-20.04
- otp: 26.2
elixir: 1.16
runner-image: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.versions.elixir }}
otp-version: ${{ matrix.versions.otp }}
- uses: actions/cache@v3
with:
path: "_build\ndeps"
key: mix-${{ matrix.versions.runner-image }}-${{ matrix.versions.otp }}-${{ matrix.versions.elixir }}-${{ github.sha }}
restore-keys: mix-${{ matrix.versions.runner-image }}-
- name: Install Elixir dependencies
env:
MIX_ENV: test
run: mix deps.get
- name: Compile
env:
MIX_ENV: test
run: mix compile
credo:
needs: compile
name: Credo
runs-on: ${{ matrix.versions.runner-image }}
strategy:
fail-fast: false
matrix:
versions:
- otp: 21.3
elixir: 1.11
runner-image: ubuntu-20.04
- otp: 26.2
elixir: 1.16
runner-image: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.versions.elixir }}
otp-version: ${{ matrix.versions.otp }}
- uses: actions/cache@v3
with:
path: "_build\ndeps"
key: mix-${{ matrix.versions.runner-image }}-${{ matrix.versions.otp }}-${{ matrix.versions.elixir }}-${{ github.sha }}
restore-keys: mix-${{ matrix.versions.runner-image }}-
- name: Check code style
env:
MIX_ENV: test
run: mix credo --strict
deps_audit:
needs: compile
name: Deps audit
runs-on: ${{ matrix.versions.runner-image }}
strategy:
fail-fast: false
matrix:
versions:
- otp: 21.3
elixir: 1.11
runner-image: ubuntu-20.04
- otp: 26.2
elixir: 1.16
runner-image: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.versions.elixir }}
otp-version: ${{ matrix.versions.otp }}
- uses: actions/cache@v3
with:
path: "_build\ndeps"
key: mix-${{ matrix.versions.runner-image }}-${{ matrix.versions.otp }}-${{ matrix.versions.elixir }}-${{ github.sha }}
restore-keys: mix-${{ matrix.versions.runner-image }}-
- name: Check for vulnerable Mix dependencies
env:
MIX_ENV: test
run: mix deps.audit
dialyzer:
needs: compile
name: Dialyzer
runs-on: ${{ matrix.versions.runner-image }}
strategy:
fail-fast: false
matrix:
versions:
- otp: 21.3
elixir: 1.11
runner-image: ubuntu-20.04
- otp: 26.2
elixir: 1.16
runner-image: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.versions.elixir }}
otp-version: ${{ matrix.versions.otp }}
- uses: actions/cache@v3
with:
path: "_build\ndeps"
key: mix-${{ matrix.versions.runner-image }}-${{ matrix.versions.otp }}-${{ matrix.versions.elixir }}-${{ github.sha }}
restore-keys: mix-${{ matrix.versions.runner-image }}-
- name: Restore PLT cache
uses: actions/cache@v3
with:
path: priv/plts
key: plt-${{ matrix.versions.runner-image }}-${{ matrix.versions.otp }}-${{ matrix.versions.elixir }}-${{ github.sha }}
restore-keys: plt-${{ matrix.versions.runner-image }}-
- name: Create PLTs
env:
MIX_ENV: test
run: mix dialyzer --plt
- name: Run dialyzer
env:
MIX_ENV: test
run: mix dialyzer --format short 2>&1
format:
needs: compile
name: Format
runs-on: ${{ matrix.versions.runner-image }}
strategy:
fail-fast: false
matrix:
versions:
- otp: 21.3
elixir: 1.11
runner-image: ubuntu-20.04
- otp: 26.2
elixir: 1.16
runner-image: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.versions.elixir }}
otp-version: ${{ matrix.versions.otp }}
- uses: actions/cache@v3
with:
path: "_build\ndeps"
key: mix-${{ matrix.versions.runner-image }}-${{ matrix.versions.otp }}-${{ matrix.versions.elixir }}-${{ github.sha }}
restore-keys: mix-${{ matrix.versions.runner-image }}-
- name: Check Elixir formatting
env:
MIX_ENV: test
run: mix format --check-formatted
hex_audit:
needs: compile
name: Hex audit
runs-on: ${{ matrix.versions.runner-image }}
strategy:
fail-fast: false
matrix:
versions:
- otp: 21.3
elixir: 1.11
runner-image: ubuntu-20.04
- otp: 26.2
elixir: 1.16
runner-image: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.versions.elixir }}
otp-version: ${{ matrix.versions.otp }}
- uses: actions/cache@v3
with:
path: "_build\ndeps"
key: mix-${{ matrix.versions.runner-image }}-${{ matrix.versions.otp }}-${{ matrix.versions.elixir }}-${{ github.sha }}
restore-keys: mix-${{ matrix.versions.runner-image }}-
- name: Check for retired Hex packages
env:
MIX_ENV: test
run: mix hex.audit
prettier:
name: Check formatting using Prettier
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore npm cache
uses: actions/cache@v3
id: npm-cache
with:
path: ~/.npm
key: npm-ubuntu-latest
- name: Install Prettier
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm i -g prettier
- name: Run Prettier
run: npx prettier -c .
test:
needs: compile
name: Test
runs-on: ${{ matrix.versions.runner-image }}
strategy:
fail-fast: false
matrix:
versions:
- otp: 21.3
elixir: 1.11
runner-image: ubuntu-20.04
- otp: 26.2
elixir: 1.16
runner-image: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.versions.elixir }}
otp-version: ${{ matrix.versions.otp }}
- uses: actions/cache@v3
with:
path: "_build\ndeps"
key: mix-${{ matrix.versions.runner-image }}-${{ matrix.versions.otp }}-${{ matrix.versions.elixir }}-${{ github.sha }}
restore-keys: mix-${{ matrix.versions.runner-image }}-
- name: Run tests
env:
MIX_ENV: test
MUX_CREDENTIALS_EMAIL: ${{ secrets.MUX_CREDENTIALS_EMAIL }}
MUX_CREDENTIALS_PASSWORD: ${{ secrets.MUX_CREDENTIALS_PASSWORD }}
run: mix test --cover
unused_deps:
needs: compile
name: Check unused deps
runs-on: ${{ matrix.versions.runner-image }}
strategy:
fail-fast: false
matrix:
versions:
- otp: 21.3
elixir: 1.11
runner-image: ubuntu-20.04
- otp: 26.2
elixir: 1.16
runner-image: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.versions.elixir }}
otp-version: ${{ matrix.versions.otp }}
- uses: actions/cache@v3
with:
path: "_build\ndeps"
key: mix-${{ matrix.versions.runner-image }}-${{ matrix.versions.otp }}-${{ matrix.versions.elixir }}-${{ github.sha }}
restore-keys: mix-${{ matrix.versions.runner-image }}-
- name: Check for unused Mix dependencies
env:
MIX_ENV: test
run: mix deps.unlock --check-unused