|
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
pull_request:
|
|
branches: [ main, develop ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential sqlite3 libsqlite3-dev valgrind
|
|
|
|
- name: Build library
|
|
run: make build-lib
|
|
|
|
- name: Run unit tests
|
|
run: make test
|
|
|
|
- name: Run memory check
|
|
run: |
|
|
echo "Memory checking (if tools available)..."
|
|
which valgrind && make memcheck || echo "valgrind not available"
|
|
|
|
- name: Generate coverage
|
|
run: |
|
|
echo "Coverage generation (if tools available)..."
|
|
which gcov && make coverage || echo "gcov not available"
|
|
|
|
- name: Upload coverage
|
|
if: success()
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
files: ./coverage.info
|
|
fail_ci_if_error: false
|