Skip to content

Use Macro.to_string/1 instead of parsing specs by "hand" #133

Use Macro.to_string/1 instead of parsing specs by "hand"

Use Macro.to_string/1 instead of parsing specs by "hand" #133

Workflow file for this run

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