Merge pull request #41 from curiosum-dev/chore/40-silence-warnings-on… #179
Workflow file for this run
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: | |
push: | |
pull_request: | |
env: | |
MIX_ENV: test | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Extract Elixir and OTP versions from .tool-versions | |
id: extract_versions | |
run: | | |
elixir_version=$(grep -oP "elixir\s+\K.+" .tool-versions) | |
otp_version=$(grep -oP "erlang\s+\K.+" .tool-versions) | |
echo "elixir_version=$elixir_version" >> $GITHUB_ENV | |
echo "otp_version=$otp_version" >> $GITHUB_ENV | |
- name: Set up Elixir | |
uses: erlef/setup-elixir@v1 | |
with: | |
elixir-version: ${{ env.elixir_version }} | |
otp-version: ${{ env.otp_version }} | |
- name: Restore dependencies and _build cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
deps | |
_build | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix- | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Build project | |
run: mix compile | |
- name: Check formatting | |
run: mix format --check-formatted | |
- name: Run tests | |
run: mix test | |
- name: Run credo | |
run: mix credo --strict |