Merge pull request #55 from Saransh-cpp/saransh/more-docs #184
This file contains hidden or 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: Unit tests | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| types: [ opened, synchronize, reopened, ready_for_review ] | |
| push: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| concurrency: | |
| cancel-in-progress: true | |
| group: >- | |
| ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| jobs: | |
| unit-tests: | |
| permissions: | |
| contents: read | |
| if: github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo + submodules | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install cmake gnuplot | |
| - name: Generate make files with testing ON | |
| run: cmake -S. -Bbuild -DTEST=ON | |
| - name: Build the project and tests | |
| run: cmake --build build -j8 | |
| - name: Run unit tests | |
| run: ctest --test-dir build --output-on-failure |