diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 000000000..7b17964e3 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,27 @@ +name: Unit Tests + +on: + push: + pull_request: + schedule: + - cron: '0 8 * * *' + +jobs: + test: + runs-on: ubuntu-latest + name: Run unit tests + + env: + FLAGS: "-fsanitize=address -fsanitize=leak -fsanitize=undefined" + + steps: + - name: Checkout source + uses: actions/checkout@v2 + + - name: Get build dependencies + run: | + sudo apt-get build-dep -qq -y . + + - name: Run unit tests with sanitizers enabled + run: | + make CFLAGS="$FLAGS" LDFLAGS="$FLAGS" check