From b94b9bee8adcaa4e892e8ca3fac7bd5511b93059 Mon Sep 17 00:00:00 2001 From: Oscar Lamas Rios Date: Mon, 25 Aug 2025 11:08:05 +0200 Subject: [PATCH] feat: update CI to use erlang 28 --- .github/workflows/build.yml | 58 ++++++++++++++++++------------------- rebar.config | 6 ++-- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5968eb2..8f0533b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: nbson ci +name: CI on: push: @@ -7,44 +7,42 @@ on: branches: [main] jobs: - test: + build: + runs-on: ubuntu-latest strategy: matrix: - include: - - image: erlang:24 - - image: erlang:25 - 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: - - name: Checkout - uses: actions/checkout@v3 - - uses: webfactory/ssh-agent@v0.7.0 - with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + - uses: actions/checkout@v4 - - 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 }} - - 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') }} - - name: Compile - run: rebar3 compile + - run: rebar3 check - - name: Run tests - run: rebar3 ci_test + - run: rebar3 compile - - name: Store test logs - uses: actions/upload-artifact@v1 - if: always() - with: - name: ct-logs - path: _build/test/logs + - run: rebar3 ci_test - - name: Create test summary - uses: test-summary/action@v1 + - uses: test-summary/action@v2 if: always() with: paths: '_build/test/logs/**/report.xml' diff --git a/rebar.config b/rebar.config index bcd867c..30fa4f2 100644 --- a/rebar.config +++ b/rebar.config @@ -3,8 +3,8 @@ ]}. {project_plugins, [ - {erlfmt, {git, "git@github.com:WhatsApp/erlfmt.git", {branch, "main"}}}, - {gradualizer, {git, "git@github.com:josefs/Gradualizer.git", {branch, "master"}}} + erlfmt, + {gradualizer, {git, "https://github.com/josefs/Gradualizer.git", {branch, "master"}}} ]}. {erlfmt, [write]}. @@ -26,7 +26,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"}}} ]} ]} ]}.