enable codecov #58
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
on: | |
- push | |
- pull_request | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- elixir: 1.6 | |
otp: 20.3 | |
- elixir: 1.8.2 | |
otp: 21.3 | |
- elixir: 1.9.4 | |
otp: 22.2 | |
- elixir: 1.10.4 | |
otp: 23.0 | |
- elixir: 1.13.0 | |
otp: 24.1 | |
- elixir: 1.14.0 | |
otp: 25.0 | |
- elixir: 1.16.0 | |
otp: 26.0 | |
check_warnings: true | |
check_format: true | |
dialyzer: true | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: erlef/setup-elixir@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- run: mix deps.get | |
- run: mix format --check-formatted | |
if: ${{ matrix.check_format }} | |
- run: mix compile --force --warnings-as-errors | |
if: ${{ matrix.check_warnings }} | |
- run: mix test --trace | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Restore PLT cache | |
uses: actions/cache@v2 | |
if: ${{ matrix.dialyzer }} | |
id: plt_cache | |
with: | |
key: | | |
${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-plt | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-plt | |
path: | | |
priv/plts | |
# Create PLTs if no cache was found | |
- name: Create PLTs | |
if: ${{ matrix.dialyzer && steps.plt_cache.outputs.cache-hit != 'true' }} | |
run: mix dialyzer --plt | |
- name: Run dialyzer | |
if: ${{ matrix.dialyzer }} | |
run: mix dialyzer |