Skip to content

New case study

New case study #102

Workflow file for this run

name: 'Test'
on:
push:
branches:
- 'main'
- 'dev'
- 'release/**'
- 'paper/**'
pull_request:
branches:
- 'main'
- 'dev'
- 'release/**'
- 'paper/**'
jobs:
skip_check:
name: 'Skip check'
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- name: 'Skip check'
id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.1
linux:
name: 'Test on Ubuntu'
needs: skip_check
runs-on: ubuntu-latest
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
container:
image: erlang:latest
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- name: 'Extract branch name'
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: branch
- name: 'Extract OTP release'
run: echo "::set-output name=otp_release::$(erl -eval 'erlang:display(list_to_integer(erlang:system_info(otp_release))), halt().' -noshell)"
id: otp_release
- name: 'Cache Dialyzer PLTs'
uses: actions/cache@v2
with:
path: |
~/.cache/rebar3/rebar3_*_plt
_build/default/rebar3_*_plt
key: |
${{ runner.os }}-${{ steps.branch.outputs.branch }}-otp-${{ steps.otp_release.outputs.otp_release }}-plt-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.config')) }}
restore-keys: |
${{ runner.os }}-${{ steps.branch.outputs.branch }}-otp-${{ steps.otp_release.outputs.otp_release }}-plt-
- name: 'Cache Hex packages'
uses: actions/cache@v2
with:
path: |
~/.cache/rebar3/hex/hexpm/packages
key: |
${{ runner.os }}-${{ steps.branch.outputs.branch }}-otp-${{ steps.otp_release.outputs.otp_release }}-hex-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.lock')) }}
restore-keys: |
${{ runner.os }}-${{ steps.branch.outputs.branch }}-otp-${{ steps.otp_release.outputs.otp_release }}-hex-
- name: 'Compile'
run: rebar3 compile
- name: 'Dialyzer'
run: rebar3 dialyzer
- name: 'XRef'
run: rebar3 xref
- name: 'Lint'
run: rebar3 lint
- name: 'Check Formatting'
run: rebar3 fmt --check
- name: 'EUnit Tests'
run: rebar3 eunit
- name: 'Common Tests'
run: rebar3 ct
macos:
name: 'Test on MacOS'
needs: skip_check
runs-on: macos-latest
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- name: 'Brew Version Check'
run: brew --version
- name: 'Keep Brew Fresh'
run: brew update
- name: 'Install Erlang'
run: brew install erlang
- name: 'Install rebar3'
run: brew install rebar3
- name: 'Compile'
run: rebar3 compile
- name: 'EUnit Tests'
run: rebar3 eunit
- name: 'Common Tests'
run: rebar3 ct
windows:
name: 'Test on Windows'
needs: skip_check
runs-on: windows-latest
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- name: 'Install Erlang'
run: choco install erlang
- name: 'Install rebar3'
run: choco install rebar3
- name: 'Compile'
run: rebar3 compile
- name: 'EUnit Tests'
run: rebar3 eunit
- name: 'Common Tests'
run: rebar3 ct