Skip to content

[PROTOTYPE] Add unnamed types support #222

[PROTOTYPE] Add unnamed types support

[PROTOTYPE] Add unnamed types support #222

Workflow file for this run

---
# See more:
# https://hashrocket.com/blog/posts/build-the-ultimate-elixir-ci-with-github-actions
name: CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
internal_dialyzer:
runs-on: ubuntu-20.04
timeout-minutes: 30
name: Internal Typespecs
env:
OTP: "23.3"
ELIXIR: "1.12"
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP }}
elixir-version: ${{ env.ELIXIR }}
- uses: actions/cache@v2
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-${{ env.OTP }}-${{ env.ELIXIR }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- uses: actions/cache@v2
id: build-cache
with:
path: _build
key: ${{ runner.os }}-${{ env.OTP }}-${{ env.ELIXIR }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- uses: actions/cache@v1
id: plt-cache
with:
path: priv/plts
key: ${{ runner.os }}-${{ env.OTP }}-${{ env.ELIXIR }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix dialyzer --plt
- run: mix dialyzer --force-check
credo:
runs-on: ubuntu-20.04
name: Code Style
env:
OTP: "23.3"
ELIXIR: "1.12"
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP }}
elixir-version: ${{ env.ELIXIR }}
- uses: actions/cache@v2
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-${{ env.OTP }}-${{ env.ELIXIR }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- uses: actions/cache@v2
id: build-cache
with:
path: _build
key: ${{ runner.os }}-${{ env.OTP }}-${{ env.ELIXIR }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- run: mix credo
formatter:
runs-on: ubuntu-20.04
name: Code Formatting
env:
OTP: "23.3"
ELIXIR: "1.12"
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP }}
elixir-version: ${{ env.ELIXIR }}
- uses: actions/cache@v2
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-${{ env.OTP }}-${{ env.ELIXIR }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- uses: actions/cache@v2
id: build-cache
with:
path: _build
key: ${{ runner.os }}-${{ env.OTP }}-${{ env.ELIXIR }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- run: mix format --check-formatted
external_dialyzer:
runs-on: ubuntu-20.04
timeout-minutes: 30
name: External Typespecs
env:
OTP: "23.3"
ELIXIR: "1.12"
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP }}
elixir-version: ${{ env.ELIXIR }}
- uses: actions/cache@v2
id: mix-cache
with:
path: test/integration/deps
key: ${{ runner.os }}-${{ env.OTP }}-${{ env.ELIXIR }}-mix-ext-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- uses: actions/cache@v2
id: build-cache
with:
path: test/integration/_build
key: ${{ runner.os }}-${{ env.OTP }}-${{ env.ELIXIR }}-build-ext-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- uses: actions/cache@v1
id: plt-cache
with:
path: test/integration/priv/plts
key: ${{ runner.os }}-${{ env.OTP }}-${{ env.ELIXIR }}-plts-ext-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- working-directory: test/integration
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- if: steps.plt-cache.outputs.cache-hit != 'true'
working-directory: test/integration
run: |
mkdir -p priv/plts
mix dialyzer --plt
- working-directory: test/integration
run: mix dialyzer --force-check
test:
runs-on: ubuntu-20.04
name: OTP ${{ matrix.otp }} / Elixir ${{ matrix.elixir }}
strategy:
fail-fast: true
# NOTE: We are going to support 4 version from the official list of 5
# https://hexdocs.pm/elixir/compatibility-and-deprecations.html
matrix:
otp: ["24.3"]
elixir: ["1.12"]
include:
- otp: "24.3"
elixir: "1.12"
- otp: "24.3"
elixir: "1.13.3"
- otp: "25.3"
elixir: "1.13"
- otp: "25.3"
elixir: "1.14"
- otp: "26.0"
elixir: "1.15"
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- uses: actions/cache@v2
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- uses: actions/cache@v2
id: build-cache
with:
path: _build
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- run: mix test