Merge pull request #16 from ziyiyin97/review-docs #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code-Coverage Workflow | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Test python API | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libglu1-mesa | |
- name: Install requirements | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
python -m pip install -e . | |
pip install pytest pytest-cov codecov | |
- name: Run tests and collect coverage | |
run: python -m pytest --cov tests/ --cov-report=xml | |
- name: Upload coverage reports to Codecov with GitHub Action | |
uses: codecov/[email protected] | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |