Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 28 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: nbson ci
name: CI

on:
push:
Expand All @@ -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'
6 changes: 3 additions & 3 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -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]}.

Expand All @@ -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"}}}
]}
]}
]}.
Expand Down