Skip to content

fix(protocol-designer) avoid the white screen by removing liquid (#20… #17636

fix(protocol-designer) avoid the white screen by removing liquid (#20…

fix(protocol-designer) avoid the white screen by removing liquid (#20… #17636

# Run tests, build labware library, and deploy it to sandbox
name: 'Labware Library test, build, and deploy'
on:
pull_request:
paths:
- 'labware-library/**'
- 'shared-data/labware/**'
- 'components/**'
- 'package.json'
- '.github/workflows/ll-test-build-deploy.yaml'
- '.github/workflows/utils.js'
- 'scripts/static-deploy/**'
push:
branches:
- 'edge'
- 'chore_release*'
tags:
- 'staging-labware-library*'
- 'labware-library*'
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.ref_name != 'edge' || github.run_id}}-${{ github.ref_type != 'tag' || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
CI: 'true'
# This is the artifact directory as a relative path
# to the working-directory of our tools: scripts/static-deploy
# our script deploy_ci_config.py expects this ENV variable is set
RELATIVE_ARTIFACT_DIR: '../../dist'
jobs:
determine-deploy-config:
name: Determine Deployment Configuration
runs-on: ubuntu-24.04
outputs:
application: ${{ steps.deploy-config.outputs.APPLICATION }}
environment: ${{ steps.deploy-config.outputs.ENVIRONMENT }}
sandbox_prefix: ${{ steps.deploy-config.outputs.SANDBOX_PREFIX }}
relative_artifact_dir: ${{ steps.deploy-config.outputs.RELATIVE_ARTIFACT_DIR }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: ./.github/actions/git/resolve-tag
- name: Setup UV
uses: astral-sh/setup-uv@v6
with:
python-version: '3.10'
- name: Setup Deploy Dependencies
working-directory: scripts/static-deploy
run: make setup
- name: Determine Deployment Configuration
id: deploy-config
working-directory: scripts/static-deploy
run: make resolve-ci
js-unit-test:
name: 'labware library unit tests'
timeout-minutes: 10
runs-on: 'ubuntu-24.04'
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: 'actions/checkout@v4'
- uses: ./.github/actions/js/setup
- name: 'run labware library unit tests'
run: make -C labware-library test-cov
- name: 'Upload coverage report'
uses: codecov/codecov-action@v5
with:
files: ./coverage/lcov.info
flags: labware-library
e2e-test:
name: 'labware library e2e tests'
timeout-minutes: 20
runs-on: 'ubuntu-24.04'
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: 'actions/checkout@v4'
- uses: ./.github/actions/js/setup
- name: 'test-e2e'
env:
OT_LL_MIXPANEL_ID: ${{ secrets.OT_LL_MIXPANEL_ID }}
OT_LL_MIXPANEL_DEV_ID: ${{ secrets.OT_LL_MIXPANEL_DEV_ID }}
run: make -C labware-library test-e2e
build-ll:
name: 'build labware library artifact'
needs: ['js-unit-test', 'e2e-test']
timeout-minutes: 10
runs-on: 'ubuntu-24.04'
if: always() && (needs.js-unit-test.result == 'success' || needs.js-unit-test.result == 'skipped') && (needs.e2e-test.result == 'success' || needs.e2e-test.result == 'skipped')
steps:
- uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- uses: ./.github/actions/js/setup
- name: 'build LL'
env:
OT_LL_MIXPANEL_ID: ${{ secrets.OT_LL_MIXPANEL_ID }}
OT_LL_MIXPANEL_DEV_ID: ${{ secrets.OT_LL_MIXPANEL_DEV_ID }}
run: |
make -C labware-library
- name: 'upload github artifact'
uses: actions/upload-artifact@v4
with:
name: 'll-artifact'
path: labware-library/dist
deploy-ll:
name: 'deploy LL artifact to S3'
runs-on: 'ubuntu-24.04'
needs: ['determine-deploy-config', 'build-ll']
timeout-minutes: 5
if: always() && needs.build-ll.result == 'success' && needs.determine-deploy-config.result == 'success'
permissions:
id-token: write
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/git/resolve-tag
- name: Setup UV
uses: astral-sh/setup-uv@v6
with:
python-version: '3.10'
- name: Setup Deploy Dependencies
working-directory: scripts/static-deploy
run: |
make setup
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-2
audience: sts.amazonaws.com
role-to-assume: ${{ secrets.DOCS_SANDBOX_ROLE }}
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: ll-artifact
path: ./dist # in the default workspace
# RELATIVE_ARTIFACT_DIR is set to ../../dist
# because that is the relative path from scripts/static-deploy
# to the this location
- name: Deploy to S3
working-directory: scripts/static-deploy
run: make deploy \
APPLICATION=${{ needs.determine-deploy-config.outputs.application }} \
ENVIRONMENT=${{ needs.determine-deploy-config.outputs.environment }} \
SANDBOX_PREFIX=${{ needs.determine-deploy-config.outputs.sandbox_prefix }} \
RELATIVE_ARTIFACT_DIR=${{ needs.determine-deploy-config.outputs.relative_artifact_dir }}