Skip to content

Merge pull request #521 from solar05/patch-1 #138

Merge pull request #521 from solar05/patch-1

Merge pull request #521 from solar05/patch-1 #138

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
check_duplicate_runs:
name: Check for duplicate runs
continue-on-error: true
runs-on: ubuntu-20.04
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ github.token }}
concurrent_skipping: always
cancel_others: true
skip_after_successful_duplicate: true
paths_ignore: '["**/README.md", "**/CHANGELOG.md", "**/LICENSE"]'
do_not_skip: '["pull_request"]'
test:
name: Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}}
runs-on: ubuntu-20.04
needs: check_duplicate_runs
if: ${{ needs.check_duplicate_runs.outputs.should_skip != 'true' }}
strategy:
fail-fast: false
matrix:
elixir:
- '1.12.3'
- '1.13.4'
- '1.14.3'
- '1.15.4'
otp:
- '23.3'
- '24.3'
- '25.3'
- '26.0'
exclude:
- elixir: '1.12.3'
otp: '25.3'
- elixir: '1.12.3'
otp: '26.0'
- elixir: '1.13.4'
otp: '26.0'
- elixir: '1.14.3'
otp: '26.0'
- elixir: '1.15.4'
otp: '23.3'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore deps cache
uses: actions/cache@v2
with:
path: |
deps
_build
key: ${{ runner.os }}-deps-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-git-${{ github.sha }}
restore-keys: |
${{ runner.os }}-deps-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
${{ runner.os }}-deps-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Install package dependencies
run: mix deps.get
- name: Remove compiled application files
run: mix clean
- name: Compile dependencies
run: mix compile
env:
MIX_ENV: test
- name: Run unit tests
run: mix test --trace
- name: Check compilation warnings
run: mix do compile --warnings-as-errors, archive.build, archive.install --force
env:
MIX_ENV: prod
- name: Check source code formatting
if: ${{ matrix.elixir > '1.15.0' }}
run: mix format --check-formatted
- name: Get results in short format
run: mix dialyzer --format short
env:
MIX_ENV: prod
- name: Get results in raw format
run: mix dialyzer --format raw
env:
MIX_ENV: prod
- name: Get results in dialyzer format
run: mix dialyzer --format dialyzer
env:
MIX_ENV: prod
- name: Get results in ignore_file format
run: mix dialyzer --format ignore_file
env:
MIX_ENV: prod
- name: Run output tests
run: mix test
env:
OUTPUT_TESTS: true
- name: Check examples
run: mix compile 2> /dev/null && mix dialyzer --format short --ignore-exit-status
env:
MIX_ENV: examples