60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
name: Validate
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends \
|
|
build-essential gcc make \
|
|
cppcheck \
|
|
lcov \
|
|
python3 python3-pip \
|
|
git ca-certificates
|
|
pip3 install --break-system-packages doorstop || pip3 install doorstop || true
|
|
|
|
- name: Static Analysis (Cppcheck)
|
|
run: make static
|
|
|
|
- name: MISRA Check
|
|
run: |
|
|
make misra || echo "MISRA findings present (Demo macht den Check non-failing)"
|
|
|
|
- name: Build + Unit Tests
|
|
run: make test
|
|
|
|
- name: Coverage Report
|
|
run: make coverage
|
|
|
|
- name: Doorstop Check
|
|
run: |
|
|
if [ -f .doorstop.yml ]; then
|
|
doorstop || echo "Doorstop check produced warnings"
|
|
fi
|
|
|
|
- name: Upload Coverage HTML
|
|
uses: actions/upload-artifact@v3
|
|
if: always()
|
|
with:
|
|
name: coverage-html
|
|
path: build/coverage-html/
|
|
|
|
- name: Upload Test Results
|
|
uses: actions/upload-artifact@v3
|
|
if: always()
|
|
with:
|
|
name: test-output
|
|
path: build/
|