Skip to content

add github action for unit tests #2

add github action for unit tests

add github action for unit tests #2

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up C++ environment
uses: kurocha/setup-cpp@v1
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtest-dev
sudo apt-get install -y cmake
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp *.a /usr/lib
- name: Build and run tests
run: |
mkdir build
cd build
cmake ..
make
./tests/test_main