39 lines
1.4 KiB
YAML
39 lines
1.4 KiB
YAML
name: PR Tests
|
|
on: [pull_request]
|
|
jobs:
|
|
test:
|
|
runs-on: docker-arm64
|
|
container:
|
|
image: python:3.14-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
|