Skip to content

Dev: Release v1.0 #159 #38

Dev: Release v1.0 #159

Dev: Release v1.0 #159 #38

#
# test.yml
#
# Copyright The RSCLib Contributors.
#
# This file is part of RSCLib.
#
# RSCLib is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# RSCLib is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with RSCLib. If not, see <http://www.gnu.org/licenses/>.
#
#
name: NGHam Unit test
on:
push:
branches: [ dev_firmware ]
pull_request:
branches: [ master, dev, dev_firmware]
# 'workflow_dispatch' allows manual execution of this workflow under the repository's 'Actions' tab
workflow_dispatch:
jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install dependencies
run: |
sudo apt install -y cmake libcmocka0 libcmocka-dev
mkdir firmware/app/libs/ngham-1.0/tests/build_tests
cd firmware/app/libs/ngham-1.0/tests/build_tests
cmake ../
- name: Compile the test
run: |
cd firmware/app/libs/ngham-1.0/tests/build_tests
cmake --build .
- name: Execute the test
run: ./firmware/app/libs/ngham-1.0/tests/build_tests/ngham_test