chore: release main (#245) #543
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: 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@v4 | |
with: | |
name: coverage-builder | |
path: /home/runner/work/cellxgene-ontology-guide/cellxgene-ontology-guide/.coverage* | |
retention-days: 3 | |
include-hidden-files: true | |
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@v4 | |
with: | |
name: coverage-api | |
path: /home/runner/work/cellxgene-ontology-guide/cellxgene-ontology-guide/.coverage* | |
retention-days: 3 | |
include-hidden-files: true | |
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@v4 | |
with: | |
pattern: coverage-* | |
merge-multiple: true | |
path: . | |
- name: coverage report | |
run: | | |
make coverage/report-xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
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 |