Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name: CI
on: [push, pull_request]
jobs:
deps:
name: Dependencies
runs-on: ubuntu-22.04
env:
MIX_ENV: test
strategy:
matrix:
include:
- elixir: 1.15
otp: 25
- elixir: 1.16
otp: 26
- elixir: 1.17
otp: 27
- elixir: 1.18
otp: 27
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}

- name: Retrieve Cached Dependencies
uses: actions/cache@v3
id: mix-cache
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}

- name: Install Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.compile
mix dialyzer --plt

static_code_analysis:
name: Static Code Analysis
needs: deps
runs-on: ubuntu-22.04
env:
MIX_ENV: test
strategy:
matrix:
include:
- elixir: 1.18
otp: 27
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}

- name: Retrieve Cached Dependencies
uses: actions/cache@v3
id: mix-cache
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}

- name: Check Code Format
run: mix format --check-formatted

- name: Run Credo
run: mix credo

- name: Run Dialyzer
run: mix dialyzer --no-check --ignore-exit-status

unit_tests:
name: Unit Tests
needs: deps
runs-on: ubuntu-22.04
env:
MIX_ENV: test
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.15
otp: 25
- elixir: 1.16
otp: 26
- elixir: 1.17
otp: 27
- elixir: 1.18
otp: 27
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}

- name: Retrieve Cached Dependencies
uses: actions/cache@v3
id: mix-cache
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}

- name: Run test
run: mix test --warnings-as-errors --trace --slowest 10

reuse:
name: Check REUSE Compliance
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install REUSE tool
run: pip install reuse

- name: Run REUSE lint
run: reuse lint
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

Loading
Loading