Fix compatibility with OTP 26 #94
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: 'Shards Test on OTP ${{ matrix.otp }} and ${{ matrix.os }}' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- otp: '26.x' | |
os: 'ubuntu-latest' | |
coverage: true | |
xref: true | |
dialyzer: true | |
- otp: '25.x' | |
os: 'ubuntu-latest' | |
- otp: '24.x' | |
os: 'ubuntu-latest' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OTP_VERSION: ${{ matrix.otp }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install OTP and Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
- name: Cache deps | |
uses: actions/cache@v3 | |
with: | |
path: | | |
_build | |
key: | | |
${{ runner.os }}-${{ matrix.otp }}-build-${{ hashFiles(format('rebar.lock')) }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.otp }}-build- | |
- name: Compile | |
run: make compile | |
- name: Tests | |
run: | | |
make test | |
if: ${{ !matrix.coverage }} | |
- name: Tests with coverage | |
run: | | |
make test | |
make covertool | |
if: ${{ matrix.coverage }} | |
- name: Xref | |
run: make xref | |
if: ${{ matrix.xref }} | |
- name: Restore PLT Cache | |
uses: actions/cache@v3 | |
id: plt-cache | |
with: | |
path: priv/plts | |
key: ${{ runner.os }}-${{ matrix.otp }}-plt-v1 | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.otp }}-plt-v1 | |
if: ${{ matrix.dialyzer }} | |
- name: Dialyzer | |
run: make dialyzer | |
if: ${{ matrix.dialyzer && steps.plt-cache.outputs.cache-hit != 'true' }} | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: _build/test/covertool/shards.covertool.xml | |
flags: otp-${{ matrix.otp }} | |
fail_ci_if_error: true | |
if: ${{ matrix.coverage }} |