feat: adding automated tests

This commit is contained in:
Alpha Nerd 2026-05-15 16:43:12 +02:00
parent e484f12228
commit 29ee360082
Signed by: alpha-nerd
SSH key fingerprint: SHA256:QkkAgVoYi9TQ0UKPkiKSfnerZy2h4qhi3SVPXJmBN+M
18 changed files with 2886 additions and 4 deletions

View file

@ -0,0 +1,39 @@
name: PR Tests
on: [pull_request]
jobs:
test:
runs-on: docker-arm64
container:
image: python:3.12-slim
env:
CMAKE_BUILD_PARALLEL_LEVEL: "4"
steps:
- name: Install system deps
run: |
apt-get update
apt-get install -y --no-install-recommends \
git ca-certificates \
build-essential pkg-config
rm -rf /var/lib/apt/lists/*
- name: Checkout
run: |
git config --global --add safe.directory "$PWD"
git clone --depth=1 \
"https://oauth2:${{ github.token }}@bitfreedom.net/code/${{ github.repository }}.git" .
git fetch --depth=1 origin "+${{ github.event.pull_request.head.sha }}:pr"
git checkout pr
- name: Fetch action source
run: |
git clone --depth=1 --branch master \
"https://oauth2:${{ github.token }}@bitfreedom.net/code/nomyo-ai/actions.git" \
./.run-tests
- uses: ./.run-tests/run-tests
with:
setup: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test/requirements_test.txt
command: pytest test/ -m "not integration" --cov=router --cov=cache --cov=db --cov=enhance --cov-fail-under=45 --cov-report=term-missing --cov-report=xml --junitxml=report.xml
artifacts-path: |
report.xml
coverage.xml