Skip to content

Merge pull request #41 from Kyorai/mk-reorganize-some-tests #149

Merge pull request #41 from Kyorai/mk-reorganize-some-tests

Merge pull request #41 from Kyorai/mk-reorganize-some-tests #149

Workflow file for this run

name: CI
on:
pull_request:
branches:
- 'master'
push:
branches:
- 'master'
jobs:
build-test:
name: Build and test on Erlang/OTP ${{ matrix.otp_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
otp_version: [23, 24, 25]
os: [ubuntu-latest, windows-latest]
# OTP 23 does not run on ubuntu-latest (22.04), see
# https://github.com/erlef/setup-beam#compatibility-between-operating-system-and-erlangotp
exclude:
- otp_version: 23
os: ubuntu-latest
include:
- otp_version: 23
os: ubuntu-20.04
env:
LATEST_OTP_RELEASE: 25
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
id: install-erlang
with:
otp-version: ${{matrix.otp_version}}
rebar3-version: '3.20'
- name: Restore Dialyzer PLT files from cache
uses: actions/cache@v3
if: ${{ matrix.otp_version == env.LATEST_OTP_RELEASE && startsWith(matrix.os, 'ubuntu') }}
with:
path: _build/*/rebar3_*_plt
key: dialyzer-plt-cache-${{ steps.install-erlang.outputs.otp-version }}-${{ runner.os }}-${{ hashFiles('rebar.config*') }}-v0
- name: Compile
run: rebar3 compile
- name: Test
run: rebar3 eunit --verbose
- name: Test (Unicode)
env:
ERL_FLAGS: '+pc unicode'
run: rebar3 eunit --verbose
- name: Dialyzer
if: ${{ matrix.otp_version == env.LATEST_OTP_RELEASE && startsWith(matrix.os, 'ubuntu') }}
run: rebar3 dialyzer