rdf-ex/.github/workflows/ci.yml

74 lines
1.7 KiB
YAML
Raw Normal View History

2020-10-09 19:33:15 +00:00
name: CI
on:
pull_request:
push:
branches:
- master
2020-10-09 19:33:15 +00:00
jobs:
test:
2021-03-06 01:36:23 +00:00
runs-on: ubuntu-16.04
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020-10-09 19:33:15 +00:00
strategy:
fail-fast: false
matrix:
include:
- pair:
elixir: 1.9.4
otp: 20.3.1
- pair:
elixir: 1.11.1
otp: 21.3
- pair:
elixir: 1.10.4
otp: 22.2
- pair:
elixir: 1.11.3
otp: 22.2
- pair:
elixir: 1.11.3
otp: 23.2.5
lint: lint
2020-10-09 19:33:15 +00:00
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1
2020-10-09 19:33:15 +00:00
with:
otp-version: ${{matrix.pair.otp}}
2020-10-09 19:33:15 +00:00
elixir-version: ${{matrix.pair.elixir}}
- name: Install Dependencies
run: mix deps.get --only test
- run: mix format --check-formatted
if: ${{ matrix.lint }}
- run: mix deps.get && mix deps.unlock --check-unused
if: ${{ matrix.lint }}
- run: mix deps.compile
- run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}
2020-10-09 19:33:15 +00:00
2021-03-18 20:43:13 +00:00
- run: mix coveralls.github
- name: Retrieve PLT Cache
uses: actions/cache@v1
id: plt-cache
with:
path: priv/plts
key: ${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix dialyzer --plt
- name: Run dialyzer
run: mix dialyzer --no-check