Prepare v1.2 release #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
MIX_ENV: ci | |
# The approach to the CI matrix: | |
# | |
# * In general, remote_ip only maintains support for the minimum supported | |
# version of Elixir, so we only need to test the versions listed in | |
# https://hexdocs.pm/elixir/compatibility-and-deprecations.html | |
# | |
# * To avoid combinatorial explosion of Elixir/OTP pairs, and to err on the | |
# side of caution, each Elixir version is paired with its lowest supported | |
# OTP version. | |
# | |
# * Additionally, the highest Elixir version is also paired with its highest | |
# supported OTP version, to cover the latest & greatest case. | |
jobs: | |
ci: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- elixir: '1.12' | |
otp: '23' | |
- elixir: '1.13' | |
otp: '23' | |
- elixir: '1.14' | |
otp: '23' | |
- elixir: '1.15' | |
otp: '24' | |
- elixir: '1.16' | |
otp: '24' | |
- elixir: '1.16' | |
otp: '26' | |
name: Elixir ${{ matrix.elixir }} (OTP ${{ matrix.otp }}) | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- id: install | |
name: Install Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
elixir-version: ${{ matrix.elixir }} | |
- name: Restore cached build | |
uses: actions/cache@v3 | |
with: | |
key: builds@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix-${{ hashFiles('mix.lock') }} | |
path: | | |
deps | |
_build | |
- name: Install dependencies | |
run: mix do deps.get, deps.compile | |
- name: Check formatting | |
run: mix format --check-formatted | |
- name: Compile | |
run: mix compile --warnings-as-errors | |
- name: Run unit tests | |
run: mix coveralls.github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Restore cached integrations | |
uses: actions/cache@v3 | |
with: | |
key: integrations@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix-${{ hashFiles('integration/tests/*/mix.lock') }} | |
path: | | |
integration/tests/*/deps | |
integration/tests/*/_build | |
- name: Run integration tests | |
run: mix integrate | |
- name: Restore cached PLTs | |
uses: actions/cache@v3 | |
with: | |
key: plts@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix-${{ hashFiles('mix.lock') }} | |
path: | | |
priv/plts | |
restore-keys: | | |
plts@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix- | |
- name: Run dialyzer | |
run: mix dialyzer |