Skip to content

Commit caef81b

Browse files
committed
List Detector - Add tests to CI
1 parent aec55c5 commit caef81b

3 files changed

Lines changed: 43 additions & 1 deletion

File tree

.github/actions/install-dependencies/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ runs:
2929
if: ${{ inputs.clang-tools == 'true' }}
3030
shell: bash
3131
run: |
32-
dnf install -y clang clang-tools-extra
32+
dnf install -y clang clang-tools-extra

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ jobs:
3232
uses: ./.github/workflows/build.yml
3333
with:
3434
os: ${{ matrix.os }}
35+
tests:
36+
needs: [build-os-matrix, build]
37+
uses: ./.github/workflows/tests.yml
38+
with:
39+
os: "oraclelinux:9"
3540
rpm-install:
3641
needs: [build-os-matrix, build]
3742
strategy:

.github/workflows/tests.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
os:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
tests:
12+
runs-on: ubuntu-latest
13+
container: ${{ inputs.os }}
14+
steps:
15+
- name: Install git
16+
run: dnf install -y git
17+
- name: Check out repository code
18+
uses: actions/checkout@v4
19+
- name: Install dependencies
20+
uses: ./.github/actions/install-dependencies
21+
- name: Install nemea
22+
run: |
23+
dnf copr enable @CESNET/NEMEA-testing
24+
dnf copr enable @CESNET/NEMEA
25+
dnf install -y epel-release
26+
dnf install -y nemea-framework-devel
27+
dnf install -y nemea
28+
dnf install -y procps-ng autoconf
29+
echo PATH=/usr/bin/nemea:$PATH >> $GITHUB_ENV
30+
- name: Compile modules
31+
run: |
32+
cmake -S . -B build -DNM_NG_ENABLE_TESTS=On
33+
make -C build install
34+
- name: Run tests
35+
run: |
36+
echo "Path=$PATH"
37+
make -C build tests

0 commit comments

Comments
 (0)