Skip to content

Commit

Permalink
Add unit test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
adazem009 committed Nov 28, 2023
1 parent 52b14e8 commit 4cb00fa
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/utests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Unit tests

on:
push:
branches: '*'
pull_request:
branches: [ "master" ]

env:
BUILD_TYPE: Debug

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y nlohmann-json3-dev libutfcpp-dev libgd-dev
shell: bash
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.6.*'
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSCRATCHCPPGUI_BUILD_UNIT_TESTS=ON

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j$(nproc --all)

- name: Run unit tests
run: ctest --test-dir build -V

0 comments on commit 4cb00fa

Please sign in to comment.