Skip to content

Making sure unit tests work #7

Making sure unit tests work

Making sure unit tests work #7

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- main
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install valgrind
run: |
sudo apt-get update
sudo apt-get install -y valgrind
- name: Compile Tests
run: |
mkdir test/bin
make test
- name: Run Tests
run: |
error=0
for test in test/bin/*; do
success=$(valgrind --leak-check=full --error-exitcode=1 --show-leak-kinds=all --errors-for-leak-kinds=all $test)
if [ $? -ne 0 ]; then
error=1
echo $success
else
echo "Test $test passed"
fi
done
exit $error