Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feat improve tests

Feat improve tests #80

Workflow file for this run

name: unit-tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake git python3 python3-pip
git clone https://github.com/google/googletest.git -b v1.14.0 && cd googletest && cmake . && make && sudo make install
- name: Create build directory
run: |
mkdir -p build
cd build
cmake -DBUILD_TESTING=ON ..
- name: Build
run: |
cd build
cmake --build . -- -j$(nproc)
- name: Run unit tests
run: |
cd build
ctest --output-on-failure -j2
- name: Upload ctest results (Testing directory)
if: always()
uses: actions/upload-artifact@v4
with:
name: ctest-results
path: build/Testing