This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
π Rename Readout to ExperimentalFactor #1473
Workflow file for this run
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-22.04 | |
env: | |
GITHUB_EVENT_NAME: ${{ github.event_name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9"] | |
group: ["bionty-unit", "bionty-docs"] | |
timeout-minutes: 25 | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Checkout lndocs | |
uses: actions/checkout@v3 | |
with: | |
repository: laminlabs/lndocs | |
ssh-key: ${{ secrets.READ_LNDOCS }} | |
path: lndocs | |
ref: main | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
cache-dependency-path: ".github/workflows/build.yml" # See dependencies below | |
- name: Cache pre-commit | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -U pip | |
pip install -U laminci | |
pip install rich | |
pip install ipywidgets | |
- name: Configure AWS | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: eu-central-1 | |
- name: Lint | |
if: matrix.python-version == '3.9' && matrix.group == 'bionty-unit' | |
run: | | |
nox -s lint | |
- name: Build | |
run: | | |
nox -s "build(group='${{ matrix.group }}')" | |
- name: upload coverage | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage--${{ matrix.group }} | |
path: .coverage | |
- name: Deploy docs | |
if: ${{ matrix.python-version == '3.9' && matrix.group == 'bionty-docs' }} | |
id: netlify | |
uses: nwtgck/[email protected] | |
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@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: "pip" | |
cache-dependency-path: ".github/workflows/build.yml" | |
- run: | | |
pip install coverage[toml] | |
pip install --no-deps . | |
- uses: actions/download-artifact@v2 | |
- 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 }} |