Skip to content

Restructure documentation: Create reader-focused README, preserve technical details in INSTRUCTIONS.md #12

Restructure documentation: Create reader-focused README, preserve technical details in INSTRUCTIONS.md

Restructure documentation: Create reader-focused README, preserve technical details in INSTRUCTIONS.md #12

Workflow file for this run

name: Test Coverage
on:
push:
branches: [main, hybrid-pipeline]
pull_request:
branches: [main, hybrid-pipeline]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
docker system prune -af
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-mock pyyaml coverage-badge
pip install numpy torch --index-url https://download.pytorch.org/whl/cpu
pip install transformers sentence-transformers pymilvus --no-deps
pip install huggingface-hub tokenizers safetensors regex requests tqdm
- name: Run tests with coverage
run: |
pytest tests/ \
--cov=src \
--cov-report=term-missing \
--cov-report=xml \
--cov-report=html \
--tb=short \
-v
- name: Generate coverage badge
if: github.event_name == 'push' && github.ref == 'refs/heads/hybrid-pipeline'
run: |
coverage-badge -o .github/badges/coverage.svg -f
- name: Upload coverage reports to Codecov
if: github.event_name == 'push'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-arxplorer
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload HTML coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/
retention-days: 7
- name: Check coverage threshold
run: |
coverage report --fail-under=70
- name: Commit coverage badge
if: github.event_name == 'push' && github.ref == 'refs/heads/hybrid-pipeline'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .github/badges/coverage.svg
git diff --staged --quiet || git commit -m "Update coverage badge [skip ci]"
git push