Skip to content

feat: set-up docsite #308

feat: set-up docsite

feat: set-up docsite #308

Workflow file for this run

name: Push Tests
on:
pull_request:
branches:
- "*"
push:
branches:
- "main"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
permissions:
id-token: write
contents: read
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-python@v5
- name: lint checks
uses: pre-commit/[email protected]
unit-test-ontology-builder:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Python cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
cd ./tools/ontology-builder
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Ontology builder unit tests
run: |
cd tools/ontology-builder
make coverage/run
- name: Upload coverage results as an artifact
uses: actions/upload-artifact@v3
with:
name: coverage
path: /home/runner/work/cellxgene-ontology-guide/cellxgene-ontology-guide/.coverage*
retention-days: 3
unit-test-python-api:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Python cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/api/python/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
cd api/python
make install-dev
- name: Python API unit tests
run: |
cd api/python
make coverage/run
- name: Upload coverage results as an artifact
uses: actions/upload-artifact@v3
with:
name: coverage
path: /home/runner/work/cellxgene-ontology-guide/cellxgene-ontology-guide/.coverage*
retention-days: 3
submit-codecoverage:
needs:
- unit-test-ontology-builder
- unit-test-python-api
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: install coverage
run: pip install coverage
- uses: actions/download-artifact@v3
with:
name: coverage
path: .
- name: coverage report
run: |
make coverage/report-xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
test-doc-generation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Python cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/api/python/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
cd api/python
make docs/install
- name: Test pdoc
run: |
cd api/python
make docs/build