🐛 Fix parents update (#107) #299
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: build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main, staging] | |
workflow_dispatch: | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_EVENT_NAME: ${{ github.event_name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10"] | |
group: ["bionty-unit", "bionty-docs"] | |
timeout-minutes: 25 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: checkout lndocs | |
uses: actions/checkout@v4 | |
with: | |
repository: laminlabs/lndocs | |
ssh-key: ${{ secrets.READ_LNDOCS }} | |
path: lndocs | |
ref: main | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
- run: pip install "laminci@git+https://x-access-token:${{ secrets.LAMIN_BUILD_DOCS }}@github.com/laminlabs/laminci" | |
- run: | | |
uv pip install --system rich | |
uv pip install --system ipywidgets | |
- uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: eu-central-1 | |
- run: nox -s lint | |
if: matrix.python-version == '3.10' && matrix.group == 'bionty-unit' | |
- run: nox -s "build(group='${{ matrix.group }}')" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: coverage--${{ matrix.group }} | |
path: .coverage | |
- uses: nwtgck/[email protected] | |
if: ${{ matrix.python-version == '3.10' && matrix.group == 'bionty-docs' }} | |
with: | |
publish-dir: "_build/html" | |
production-deploy: ${{ github.event_name == 'push' }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
enable-commit-comment: false | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
coverage: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- run: | | |
pip install -U pip uv | |
uv pip install --system coverage[toml] | |
uv pip install --system --no-deps . | |
- uses: actions/download-artifact@v3 | |
- name: run coverage | |
run: | | |
coverage combine coverage--*/.coverage* | |
coverage report --fail-under=0 | |
coverage xml | |
- uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |