Skip to content

test

test #20

Workflow file for this run

name: Unit Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
unittest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/apt
key: ${{ runner.os }}-apt-cache-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-apt-cache-
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ cmake lcov gcovr
sudo apt-get install -y libgtest-dev
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp ./lib/libgtest*.a /usr/lib
- name: Configure CMake
run: cmake -S . -B build -DBUILD_TESTS=ON -DBUILD_COVERAGE=ON
- name: Build
run: cmake --build build --config Release
- name: Run tests
run: build/test/unittest/oasvalidator-unittests