Workflow update #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run unit tests | |
on: | |
workflow_call: | |
push: | |
paths: | |
- 'cpp/**' | |
- '.github/workflows/cpp.yml' | |
pull_request: | |
paths: | |
- 'cpp/**' | |
- '.github/workflows/cpp.yml' | |
branches: | |
- 'develop' | |
- 'main' | |
env: | |
PACKAGES: protobuf-compiler libspdlog-dev libpcap-dev libprotobuf-dev libgmock-dev | |
jobs: | |
unit_tests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: cpp | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sudo apt-get install ${{ env.PACKAGES }} | |
- name: Build unit tests | |
run: make -j $(nproc) test | |
- name: Run unit tests | |
run: bin/s2p_test |