Skip to content

Several code improvements (#69) #183

Several code improvements (#69)

Several code improvements (#69) #183

Workflow file for this run

name: CI Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
check_format:
name: Code format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.13.4'
otp-version: '24.3'
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Check format
run: mix format --check-formatted
- name: Check credo
run: mix credo --strict
- name: Restore build Cache
uses: actions/cache@v1
id: build-cache
with:
path: _build
key: ${{ runner.os }}-build
dialyzer:
name: Typecheck with dialyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.14.2'
otp-version: '25.2'
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Restore build Cache
uses: actions/cache@v1
id: build-cache
with:
path: _build
key: ${{ runner.os }}-build
- name: Create PLTs
run: mix dialyzer --plt
- name: Typecheck
run: mix dialyzer
test:
name: Test OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
runs-on: ubuntu-20.04 # Later Ubuntu versions do not have OTP 22
strategy:
matrix:
otp: ['22.3', '23.3', '24.3', '25.2']
elixir: ['1.7.4', '1.8.2', '1.9.4', '1.10.4', '1.11.4', '1.12.3', '1.13.4', '1.14.2']
exclude:
- otp: '22.3'
elixir: '1.14.2'
- otp: '23.3'
elixir: '1.7.4'
- otp: '23.3'
elixir: '1.8.2'
- otp: '23.3'
elixir: '1.9.4'
- otp: '23.3'
elixir: '1.10.4'
- otp: '24.3'
elixir: '1.7.4'
- otp: '24.3'
elixir: '1.8.2'
- otp: '24.3'
elixir: '1.9.4'
- otp: '24.3'
elixir: '1.10.4'
- otp: '25.2'
elixir: '1.7.4'
- otp: '25.2'
elixir: '1.8.2'
- otp: '25.2'
elixir: '1.9.4'
- otp: '25.2'
elixir: '1.10.4'
- otp: '25.2'
elixir: '1.11.4'
- otp: '25.2'
elixir: '1.12.3'
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{matrix.elixir}}
otp-version: ${{matrix.otp}}
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Restore build Cache
uses: actions/cache@v1
id: build-cache
with:
path: _build
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build
- name: Run tests
run: mix coveralls.github --include property_based
env:
ASSERT_RECEIVE_TIMEOUT: 300
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}