Skip to content

Add Catch2 for testing shared code, GeoJSON parser fixes #16

Add Catch2 for testing shared code, GeoJSON parser fixes

Add Catch2 for testing shared code, GeoJSON parser fixes #16

Workflow file for this run

name: test
on:
pull_request:
branches: [ main, develop, release/** ]
push:
branches: [ main, develop, release/** ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install build tools and dependencies
run: sudo apt-get update && sudo apt-get install cmake ninja-build clang libgl-dev libgles-dev
- name: Cache build directory
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-cmake-build-debug
with:
path: build-debug
key: ${{ runner.os }}
restore-keys: |
${{ runner.os }}
- name: Build
run: |
cmake -G Ninja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DBUILD_JVM=OFF -DBUILD_STANDALONE=OFF -B build-debug
cmake --build build-debug -- tests
- name: Test
run: |
mkdir test-results
cd shared/test # for access to data/ directory
../../build-debug/shared/test/tests \
--skip-benchmarks \
-r JUnit::out=../../test-results/catch2-junit.xml \
-r console::colour-mode=ansi
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
test-results/catch2-junit.xml
test_file_prefix: -/home/runner/work/
comment_mode: off