📎 update GHA versions and fix typos, closes #1 #53
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: Build and Test | |
on: push | |
env: | |
ELIXIR_VERSION: 1.14 | |
MIX_ENV: test | |
OTP_VERSION: 25 | |
jobs: | |
build-test: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Beam v${{ env.ELIXIR_VERSION }}-otp-${{ env.OTP_VERSION }} | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ env.ELIXIR_VERSION }} | |
otp-version: ${{ env.OTP_VERSION }} | |
- name: Cache Dependencies | |
uses: actions/cache@v1 | |
id: cache-deps | |
with: | |
path: deps | |
key: deps-${{ env.MIX_ENV }}-v${{ env.ELIXIR_VERSION }}-otp-${{ env.OTP_VERSION }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
restore-keys: | | |
deps-${{ env.MIX_ENV }}-v${{ env.ELIXIR_VERSION }}-otp-${{ env.OTP_VERSION }}- | |
- name: Cache Dialyzer PLTs | |
uses: actions/cache@v1 | |
with: | |
path: _build/plts | |
key: plts-v${{ env.ELIXIR_VERSION }}-otp-${{ env.OTP_VERSION }}-r1-${{ github.sha }} | |
restore-keys: | | |
plts-v${{ env.ELIXIR_VERSION }}-otp-${{ env.OTP_VERSION }}-r1- | |
- name: Get Dependencies | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: mix deps.get | |
- name: Check Source Code Formatting | |
run: mix format --check-formatted | |
- name: Compile Code | |
run: mix compile --warning-as-errors | |
- name: Run Tests | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: mix coveralls.github | |
- name: Run Dialyzer | |
run: mix cached_dialyzer |