Skip to content

Commit

Permalink
ci: Use ubuntu-20.04 for tests because it is required for OTP 23
Browse files Browse the repository at this point in the history
  • Loading branch information
codeadict committed Feb 13, 2023
1 parent 91f5188 commit 7d43fe0
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,34 @@ name: CI
on:
pull_request:
branches:
- 'master'
- "master"
push:
branches:
- 'master'
- "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.1.1']
os: [ubuntu-latest, windows-latest]
otp_version: ["23", "24", "25.1.1"]
os:
# TODO: change to ubuntu-latest after OTP 23 is deprecated, see
# https://github.com/erlef/setup-beam#compatibility-between-operating-system-and-erlangotp
- ubuntu-20.04
- windows-latest
env:
LATEST_OTP_RELEASE: '25.1.1'
LATEST_OTP_RELEASE: "25.1.1"
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
id: install-erlang
with:
otp-version: ${{matrix.otp_version}}
rebar3-version: '3.19'
rebar3-version: "3.19"
- name: Restore Dialyzer PLT files from cache
uses: actions/cache@v3
if: ${{ matrix.otp_version == env.LATEST_OTP_RELEASE && matrix.os == 'ubuntu-latest' }}
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
Expand All @@ -38,5 +42,5 @@ jobs:
ERL_FLAGS: "+pc unicode"
run: rebar3 eunit --verbose
- name: Dialyzer
if: ${{ matrix.otp_version == env.LATEST_OTP_RELEASE && matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.otp_version == env.LATEST_OTP_RELEASE && startsWith(matrix.os, 'ubuntu') }}
run: rebar3 dialyzer

0 comments on commit 7d43fe0

Please sign in to comment.