From 2c7f3c4e46ef9073513da67884d217bb04b9b543 Mon Sep 17 00:00:00 2001 From: Oscar Lamas Rios Date: Mon, 25 Aug 2025 12:04:10 +0200 Subject: [PATCH] feat: update CI to use erlang 28 --- .github/workflows/build.yml | 69 ++++++++++++++++++------------------- rebar.config | 4 +-- 2 files changed, 35 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aefd904..3c4c0ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,5 @@ -name: ci +name: CI + on: push: branches: @@ -9,52 +10,48 @@ on: jobs: build: + runs-on: ubuntu-latest strategy: matrix: - include: - - image: erlang:24 - - image: erlang:25 - - image: erlang:26 - runs-on: ubuntu-latest - container: - image: ${{ matrix.image }} - options: "--entrypoint /bin/bash" - + combo: + - otp-version: '25.2' + rebar3-version: '3.18.0' + - otp-version: '26.2' + rebar3-version: '3.23.0' + - otp-version: '27.2' + rebar3-version: '3.24.0' + - otp-version: '28.0' + rebar3-version: '3.25.0' steps: - # Setup - - name: Checkout - uses: actions/checkout@v3 - - uses: webfactory/ssh-agent@v0.7.0 + - uses: actions/checkout@v4 + + - uses: webfactory/ssh-agent@v0.9.0 with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - # Inspect rebar3 version - - name: Rebar version - run: rebar3 --version + - uses: erlef/setup-beam@v1.18 + with: + otp-version: ${{ matrix.combo.otp-version }} + rebar3-version: ${{ matrix.combo.rebar3-version }} - # PRE Checks - - name: Checks - run: rebar3 check + - uses: actions/cache@v4 + id: rebar3-cache + with: + path: | + ~/.cache/rebar3 + _build + key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.combo.otp-version }}-${{ matrix.combo.rebar3-version }}-${{ hashFiles('rebar.lock') }} - # Compile - - name: Compile - run: rebar3 compile + - run: rebar3 check - # Tests - - name: Run tests - run: rebar3 test_ci - - name: Store test logs - uses: actions/upload-artifact@v1 - if: always() - with: - name: ct-logs - path: _build/test/logs + - run: rebar3 compile + + - run: rebar3 test_ci - # Cover reports - name: Create Cover Reports run: rebar3 cover - - name: Publish Test Report - uses: nomasystems/action-junit-report@v2 + - uses: test-summary/action@v2 + if: always() with: - report_paths: '_build/test/logs/**/report.xml' + paths: '_build/test/logs/**/report.xml' diff --git a/rebar.config b/rebar.config index 8209a1e..4d0ab2c 100644 --- a/rebar.config +++ b/rebar.config @@ -5,7 +5,7 @@ ]}. {project_plugins, [ - {erlfmt, {git, "git@github.com:WhatsApp/erlfmt.git", {branch, "main"}}} + erlfmt ]}. {erlfmt, [write]}. @@ -28,7 +28,7 @@ {profiles, [ {test, [ {deps, [ - {nct_util, {git, "git@github.com:nomasystems/nct_util.git", {branch, "main"}}} + {nct_util, {git, "https://github.com/nomasystems/nct_util.git", {branch, "main"}}} ]} ]} ]}.