🚚 docs: Update the author name #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
CACHE_PREFIX_DEPS: v1-deps | |
CACHE_PREFIX_DIALYZER: v1-dialyzer | |
CACHE_PREFIX_BUILD: v1-_build | |
jobs: | |
mix_test: | |
name: mix test (Erlang/OTP ${{matrix.otp}} | Elixir ${{matrix.elixir}} | Alpine ${{ matrix.alpine }}) | |
runs-on: ubuntu-latest | |
container: hexpm/elixir:${{ matrix.elixir }}-erlang-${{ matrix.otp }}-alpine-${{ matrix.alpine }} | |
env: | |
MIX_ENV: test | |
VERSION_ALPINE: ${{ matrix.alpine }} | |
VERSION_ELIXIR: ${{ matrix.elixir }} | |
VERSION_OTP: ${{ matrix.otp }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- alpine: 3.11.6 | |
elixir: 1.10.3 | |
otp: 21.3.8.16 | |
- alpine: 3.11.6 | |
elixir: 1.11.2 | |
otp: 22.3.4.3 | |
- alpine: 3.11.6 | |
elixir: 1.11.2 | |
otp: 23.0.2 | |
- alpine: 3.14.0 | |
elixir: 1.12.3 | |
otp: 24.1.1 | |
- alpine: 3.16.2 | |
elixir: 1.13.4 | |
otp: 23.3.4.17 | |
- alpine: 3.16.2 | |
elixir: 1.13.4 | |
otp: 23.3.4.17 | |
- alpine: 3.16.2 | |
elixir: 1.14.0 | |
otp: 24.3.4.5 | |
steps: | |
- name: Install tar (neeeds to be POSIX compliant for caching) | |
run: apk --no-cache add tar | |
- uses: actions/checkout@v3 | |
- name: Cache - deps/ | |
uses: actions/cache@v3 | |
with: | |
path: deps/ | |
key: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- | |
- name: Install Dependencies | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get --only "$MIX_ENV" | |
- name: Cache - _build/ | |
uses: actions/cache@v3 | |
with: | |
path: _build/ | |
key: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- | |
- run: mix compile --warnings-as-errors | |
- run: mix test | |
coverage: | |
name: Collect Test Coverage | |
runs-on: ubuntu-latest | |
container: hexpm/elixir:1.14.0-erlang-24.3.4.5-alpine-3.16.2 | |
env: | |
MIX_ENV: test | |
VERSION_ALPINE: 3.16.2 | |
VERSION_ELIXIR: 1.14.0 | |
VERSION_OTP: 24.3.4.5 | |
steps: | |
- name: Install git (required for mix coveralls.github) and tar (needs to be POSIX compliant for caching) | |
run: apk add --no-cache git tar | |
# mix coveralls.github uses git to fetch the pr head so we ensure the whole history is available | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Cache - deps/ | |
uses: actions/cache@v3 | |
with: | |
path: deps/ | |
key: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP}}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP}}- | |
- name: Install Dependencies | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get --only "$MIX_ENV" | |
- name: Cache - _build/ | |
uses: actions/cache@v3 | |
with: | |
path: _build/ | |
key: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- | |
- run: mix compile --warnings-as-errors | |
- run: mix coveralls.github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
check_formatting: | |
name: Check Formatting | |
runs-on: ubuntu-latest | |
container: hexpm/elixir:1.14.0-erlang-24.3.4.5-alpine-3.16.2 | |
env: | |
MIX_ENV: dev | |
VERSION_ALPINE: 3.16.2 | |
VERSION_ELIXIR: 1.14.0 | |
VERSION_OTP: 24.3.4.5 | |
steps: | |
- name: Install tar (neeeds to be POSIX compliant for caching) | |
run: apk --no-cache add tar | |
- uses: actions/checkout@v3 | |
- name: Cache - deps/ | |
uses: actions/cache@v3 | |
with: | |
path: deps/ | |
key: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- | |
- name: Install Dependencies | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get --only "$MIX_ENV" | |
- name: Cache - _build/ | |
uses: actions/cache@v3 | |
with: | |
path: _build/ | |
key: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- | |
- run: mix compile | |
- run: mix format --check-formatted | |
check_style: | |
name: Check Style with Credo | |
runs-on: ubuntu-latest | |
container: hexpm/elixir:1.14.0-erlang-24.3.4.5-alpine-3.16.2 | |
env: | |
MIX_ENV: dev | |
VERSION_ALPINE: 3.16.2 | |
VERSION_ELIXIR: 1.14.0 | |
VERSION_OTP: 24.3.4.5 | |
steps: | |
- name: Install tar (neeeds to be POSIX compliant for caching) | |
run: apk --no-cache add tar | |
- uses: actions/checkout@v3 | |
- name: Cache - deps/ | |
uses: actions/cache@v3 | |
with: | |
path: deps/ | |
key: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- | |
- name: Install Dependencies | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get --only "$MIX_ENV" | |
- name: Cache - _build/ | |
uses: actions/cache@v3 | |
with: | |
path: _build/ | |
key: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- | |
- run: mix compile | |
- run: mix credo | |
check_types: | |
name: Check Types with Dialyzer (including generated) | |
runs-on: ubuntu-latest | |
container: hexpm/elixir:1.14.0-erlang-24.3.4.5-alpine-3.16.2 | |
env: | |
MIX_ENV: dev | |
VERSION_ALPINE: 3.16.2 | |
VERSION_ELIXIR: 1.14.0 | |
VERSION_OTP: 24.3.4.5 | |
steps: | |
- name: Install tar (neeeds to be POSIX compliant for caching) | |
run: apk --no-cache add tar | |
- uses: actions/checkout@v3 | |
- name: Cache - deps/ | |
uses: actions/cache@v3 | |
with: | |
path: deps/ | |
key: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- | |
- name: Install Dependencies | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get --only "$MIX_ENV" | |
- name: Cache - _build/ | |
uses: actions/cache@v3 | |
with: | |
path: _build/ | |
key: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- | |
- run: mix compile | |
- name: Cache - Dialyzer PLTs | |
uses: actions/cache@v3 | |
with: | |
path: .dialyzer/ | |
key: ${{ env.CACHE_PREFIX_DIALYZER }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ env.CACHE_PREFIX_DIALYZER }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- | |
- run: mix dialyzer |