| 1 | --- |
| 2 | # Runs Tests on Pushes to `master` and Pull Requests |
| 3 | name: Tests |
| 4 | on: |
| 5 | push: |
| 6 | branches: |
| 7 | - master |
| 8 | paths: |
| 9 | - 'CMakeLists.txt' |
| 10 | - '**.c' |
| 11 | - '**.h' |
| 12 | pull_request: |
| 13 | paths: |
| 14 | - 'CMakeLists.txt' |
| 15 | - '**.c' |
| 16 | - '**.h' |
| 17 | env: |
| 18 | DISABLE_TELEMETRY: 1 |
| 19 | concurrency: |
| 20 | group: tests-${{ github.ref }} |
| 21 | cancel-in-progress: true |
| 22 | jobs: |
| 23 | unit-tests-legacy: |
| 24 | name: Unit Tests (legacy) |
| 25 | runs-on: ubuntu-latest |
| 26 | steps: |
| 27 | - name: Checkout |
| 28 | uses: actions/checkout@v6 |
| 29 | with: |
| 30 | submodules: recursive |
| 31 | - name: Prepare environment |
| 32 | run: | |
| 33 | ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata-all |
| 34 | sudo apt-get install -y libjson-c-dev libyaml-dev libipmimonitoring-dev libcups2-dev libsnappy-dev \ |
| 35 | libprotobuf-dev libprotoc-dev libssl-dev protobuf-compiler \ |
| 36 | libnetfilter-acct-dev |
| 37 | - name: Run ./tests/run-unit-tests.sh |
| 38 | env: |
| 39 | CFLAGS: "-O1 -DNETDATA_INTERNAL_CHECKS=1 -DNETDATA_VERIFY_LOCKS=1" |
| 40 | run: | |
| 41 | ./tests/run-unit-tests.sh |