Skip to content

Commit

Permalink
add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdotb committed Aug 25, 2024
1 parent f91c385 commit f88b8c1
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

env:
MIX_ENV: test

jobs:
code_quality_and_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.17.0
erlang: 27.0.0
name: Elixir v${{ matrix.elixir }}, Erlang v${{ matrix.erlang }}
steps:
- uses: actions/checkout@v4

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

- name: Retrieve Dependencies Cache
uses: actions/cache@v4
id: mix-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ matrix.erlang }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }}

- name: Install Mix Dependencies
run: mix deps.get

- name: Check unused dependencies
run: mix deps.unlock --check-unused

- name: Compile dependencies
run: mix deps.compile

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

- name: Check application compile warnings
run: mix compile --force --warnings-as-errors

- name: Check Credo warnings
run: mix credo

- name: Run tests
run: mix test

0 comments on commit f88b8c1

Please sign in to comment.