Ensure git path resolution for different versions #182
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: Run test suite and linters | |
on: | |
push: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "26.2" | |
elixir-version: "1.16" | |
- name: Set mix file hash | |
id: set_vars | |
run: | | |
mix_hash="${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}" | |
echo "::set-output name=mix_hash::$mix_hash" | |
- name: Cache deps | |
uses: actions/cache@v2 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-v2-${{ steps.set_vars.outputs.mix_hash }} | |
restore-keys: | | |
${{ runner.os }}-mix- | |
- name: Cache _build folder | |
uses: actions/cache@v2 | |
with: | |
path: _build | |
key: ${{ runner.os }}-build-v2-${{ steps.set_vars.outputs.mix_hash }} | |
restore-keys: | | |
${{ runner.os }}-build-v2- | |
- name: Install Dependencies | |
run: | | |
mix deps.get | |
- name: Check format | |
run: | | |
mix format --check-formatted | |
- name: Run Dialyzer | |
run: | | |
mix dialyzer | |
- name: Run tests | |
run: | | |
mix test |