Skip to content

Commit

Permalink
Merge branch 'edge' into shared-data-add_liquid_class_definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
sanni-t committed Nov 15, 2024
2 parents 72b7d1a + 99b9f76 commit 0cb41b8
Show file tree
Hide file tree
Showing 792 changed files with 47,492 additions and 9,935 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ robot-server/**
shared-data/python/**
hardware-testing/**

# abr-testing don't format the json protocols
abr-testing/protocols/**

# analyses-snapshot-testing don't format the json protocols
analyses-snapshot-testing/files
# don't format the snapshots
Expand Down
30 changes: 23 additions & 7 deletions .github/workflows/analyses-snapshot-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
env:
BASE_IMAGE_NAME: opentrons-python-base:3.10
ANALYSIS_REF: ${{ github.event.inputs.ANALYSIS_REF || github.head_ref || 'edge' }}
SNAPSHOT_REF: ${{ github.event.inputs.SNAPSHOT_REF || github.head_ref || 'edge' }}
# If we're running because of workflow_dispatch, use the user input to decide
# whether to open a PR on failure. Otherwise, there is no user input,
# so we only open a PR if the PR has the label 'gen-analyses-snapshot-pr'
OPEN_PR_ON_FAILURE: ${{ (github.event_name == 'workflow_dispatch' && github.events.inputs.OPEN_PR_ON_FAILURE) || ((github.event_name != 'workflow_dispatch') && (contains(github.event.pull_request.labels.*.name, 'gen-analyses-snapshot-pr'))) }}
OPEN_PR_ON_FAILURE: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.OPEN_PR_ON_FAILURE) || ((github.event_name != 'workflow_dispatch') && (contains(github.event.pull_request.labels.*.name, 'gen-analyses-snapshot-pr'))) }}
PR_TARGET_BRANCH: ${{ github.event.pull_request.base.ref || 'not a pr'}}
steps:
- name: Checkout Repository
Expand All @@ -71,9 +72,24 @@ jobs:
echo "Analyses snapshots match ${{ env.PR_TARGET_BRANCH }} snapshots."
fi
- name: Docker Build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build base image
id: build_base_image
uses: docker/build-push-action@v6
with:
context: analyses-snapshot-testing/citools
file: analyses-snapshot-testing/citools/Dockerfile.base
push: false
load: true
tags: ${{ env.BASE_IMAGE_NAME }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build analysis image
working-directory: analyses-snapshot-testing
run: make build-opentrons-analysis
run: make build-opentrons-analysis BASE_IMAGE_NAME=${{ env.BASE_IMAGE_NAME }} ANALYSIS_REF=${{ env.ANALYSIS_REF }} CACHEBUST=${{ github.run_number }}

- name: Set up Python 3.13
uses: actions/setup-python@v5
Expand Down Expand Up @@ -112,8 +128,8 @@ jobs:
commit-message: 'fix(analyses-snapshot-testing): heal analyses snapshots'
title: 'fix(analyses-snapshot-testing): heal ${{ env.ANALYSIS_REF }} snapshots'
body: 'This PR was requested on the PR https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
branch: 'analyses-snapshot-testing/${{ env.ANALYSIS_REF }}-from-${{ env.SNAPSHOT_REF}}'
base: ${{ env.SNAPSHOT_REF}}
branch: 'analyses-snapshot-testing/${{ env.ANALYSIS_REF }}-from-${{ env.SNAPSHOT_REF }}'
base: ${{ env.SNAPSHOT_REF }}

- name: Comment on feature PR
if: always() && steps.create_pull_request.outcome == 'success' && github.event_name == 'pull_request'
Expand All @@ -135,5 +151,5 @@ jobs:
commit-message: 'fix(analyses-snapshot-testing): heal ${{ env.ANALYSIS_REF }} snapshots'
title: 'fix(analyses-snapshot-testing): heal ${{ env.ANALYSIS_REF }} snapshots'
body: 'The ${{ env.ANALYSIS_REF }} overnight analyses snapshot test is failing. This PR was opened to alert us to the failure.'
branch: 'analyses-snapshot-testing/${{ env.ANALYSIS_REF }}-from-${{ env.SNAPSHOT_REF}}'
base: ${{ env.SNAPSHOT_REF}}
branch: 'analyses-snapshot-testing/${{ env.ANALYSIS_REF }}-from-${{ env.SNAPSHOT_REF }}'
base: ${{ env.SNAPSHOT_REF }}
39 changes: 24 additions & 15 deletions .github/workflows/app-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ jobs:
if: startsWith(matrix.os, 'windows') && contains(needs.determine-build-type.outputs.type, 'release')
shell: bash
run: |
echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
echo "${{ secrets.SM_CLIENT_CERT_FILE_B64_V2 }}" | base64 --decode > /d/Certificate_pkcs12.p12
echo "${{ secrets.WINDOWS_CSC_B64}}" | base64 --decode > /d/opentrons_labworks_inc.crt
echo "C:\Program Files (x86)\Windows Kits\10\App Certification Kit" >> $GITHUB_PATH
echo "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools" >> $GITHUB_PATH
Expand All @@ -318,19 +318,28 @@ jobs:
if: startsWith(matrix.os, 'windows') && contains(needs.determine-build-type.outputs.type, 'release')
shell: cmd
env:
SM_HOST: ${{ secrets.SM_HOST }}
SM_HOST: ${{ secrets.SM_HOST_V2 }}
SM_CLIENT_CERT_FILE: "D:\\Certificate_pkcs12.p12"
SM_CLIENT_CERT_PASSWORD: ${{secrets.SM_CLIENT_CERT_PASSWORD}}
SM_API_KEY: ${{secrets.SM_API_KEY}}
SM_CLIENT_CERT_PASSWORD: ${{secrets.SM_CLIENT_CERT_PASSWORD_V2}}
SM_API_KEY: ${{secrets.SM_API_KEY_V2}}
run: |
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/Keylockertools-windows-x64.msi/download -H "x-api-key:${{secrets.SM_API_KEY}}" -o Keylockertools-windows-x64.msi
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/Keylockertools-windows-x64.msi/download -H "x-api-key:${{secrets.SM_API_KEY_V2}}" -o Keylockertools-windows-x64.msi
msiexec /i Keylockertools-windows-x64.msi /quiet /qn
smksp_registrar.exe list
smctl.exe keypair ls
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
smksp_cert_sync.exe
smctl.exe healthcheck --all
# Do the frontend dist bundle
- name: 'bundle ${{matrix.variant}} frontend'
env:
OT_APP_MIXPANEL_ID: ${{ secrets.OT_APP_MIXPANEL_ID }}
OT_APP_INTERCOM_ID: ${{ secrets.OT_APP_INTERCOM_ID }}
OPENTRONS_PROJECT: ${{ steps.project.outputs.project }}
run: |
make -C app dist
# build the desktop app and deploy it
- name: 'build ${{matrix.variant}} app for ${{ matrix.os }}'
if: matrix.target == 'desktop'
Expand All @@ -339,18 +348,18 @@ jobs:
OT_APP_MIXPANEL_ID: ${{ secrets.OT_APP_MIXPANEL_ID }}
OT_APP_INTERCOM_ID: ${{ secrets.OT_APP_INTERCOM_ID }}
WINDOWS_SIGN: ${{ format('{0}', contains(needs.determine-build-type.outputs.type, 'release')) }}
SM_HOST: ${{secrets.SM_HOST}}
SM_CODE_SIGNING_CERT_SHA1_HASH: ${{secrets.SM_CODE_SIGNING_CERT_SHA1_HASH_V2}}
SM_KEYPAIR_ALIAS: ${{secrets.SM_KEYPAIR_ALIAS_V2}}
SM_HOST: ${{ secrets.SM_HOST_V2 }}
SM_CLIENT_CERT_FILE: "D:\\Certificate_pkcs12.p12"
SM_CLIENT_CERT_PASSWORD: ${{secrets.SM_CLIENT_CERT_PASSWORD}}
SM_API_KEY: ${{secrets.SM_API_KEY}}
SM_CODE_SIGNING_CERT_SHA1_HASH: ${{secrets.SM_CODE_SIGNING_CERT_SHA1_HASH}}
SM_KEYPAIR_ALIAS: ${{secrets.SM_KEYPAIR_ALIAS}}
SM_CLIENT_CERT_PASSWORD: ${{secrets.SM_CLIENT_CERT_PASSWORD_V2}}
SM_API_KEY: ${{secrets.SM_API_KEY_V2}}
WINDOWS_CSC_FILEPATH: "D:\\opentrons_labworks_inc.crt"
CSC_LINK: ${{ secrets.OT_APP_CSC_MACOS }}
CSC_KEY_PASSWORD: ${{ secrets.OT_APP_CSC_KEY_MACOS }}
APPLE_ID: ${{ secrets.OT_APP_APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.OT_APP_APPLE_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.OT_APP_APPLE_TEAM_ID }}
CSC_LINK: ${{ secrets.OT_APP_CSC_MACOS_V2 }}
CSC_KEY_PASSWORD: ${{ secrets.OT_APP_CSC_KEY_MACOS_V2 }}
APPLE_ID: ${{ secrets.OT_APP_APPLE_ID_V2 }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.OT_APP_APPLE_ID_PASSWORD_V2 }}
APPLE_TEAM_ID: ${{ secrets.OT_APP_APPLE_TEAM_ID_V2 }}
HOST_PYTHON: python
OPENTRONS_PROJECT: ${{ steps.project.outputs.project }}
OT_APP_DEPLOY_BUCKET: ${{ steps.project.outputs.bucket }}
Expand Down
86 changes: 43 additions & 43 deletions .github/workflows/pd-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,49 +79,49 @@ jobs:
files: ./coverage/lcov.info
flags: protocol-designer

# e2e-test:
# name: 'pd e2e tests'
# needs: ['js-unit-test']
# timeout-minutes: 30
# strategy:
# matrix:
# os: ['ubuntu-22.04']
# runs-on: '${{ matrix.os }}'
# steps:
# - uses: 'actions/checkout@v3'
# with:
# fetch-depth: 0
# # https://github.com/actions/checkout/issues/290
# - name: 'Fix actions/checkout odd handling of tags'
# if: startsWith(github.ref, 'refs/tags')
# run: |
# git fetch -f origin ${{ github.ref }}:${{ github.ref }}
# git checkout ${{ github.ref }}
# - uses: 'actions/setup-node@v3'
# with:
# node-version: '18.19.0'
# - name: 'install udev for usb-detection'
# if: startsWith(matrix.os, 'ubuntu')
# run: |
# # WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
# sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
# sudo apt-get update && sudo apt-get install libudev-dev
# - name: 'cache yarn cache'
# uses: actions/cache@v3
# with:
# path: |
# ${{ github.workspace }}/.yarn-cache
# ${{ github.workspace }}/.npm-cache
# key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
# restore-keys: |
# js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-
# - name: 'setup-js'
# run: |
# npm config set cache ./.npm-cache
# yarn config set cache-folder ./.yarn-cache
# make setup-js
# - name: 'test-e2e'
# run: make -C protocol-designer test-e2e
e2e-test:
name: 'pd e2e tests'
needs: ['js-unit-test']
timeout-minutes: 30
strategy:
matrix:
os: ['ubuntu-22.04']
runs-on: '${{ matrix.os }}'
steps:
- uses: 'actions/checkout@v3'
with:
fetch-depth: 0
# https://github.com/actions/checkout/issues/290
- name: 'Fix actions/checkout odd handling of tags'
if: startsWith(github.ref, 'refs/tags')
run: |
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
git checkout ${{ github.ref }}
- uses: 'actions/setup-node@v3'
with:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
if: startsWith(matrix.os, 'ubuntu')
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.yarn-cache
${{ github.workspace }}/.npm-cache
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-
- name: 'setup-js'
run: |
npm config set cache ./.npm-cache
yarn config set cache-folder ./.yarn-cache
make setup-js
- name: 'test-e2e'
run: make -C protocol-designer test-e2e
build-pd:
name: 'build protocol designer artifact'
needs: ['js-unit-test']
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ lint-js-prettier:

.PHONY: lint-json
lint-json:
yarn eslint --max-warnings 0 --ext .json .
yarn eslint --ignore-pattern "abr-testing/protocols/" --max-warnings 0 --ext .json .

.PHONY: lint-css
lint-css:
Expand Down
3 changes: 2 additions & 1 deletion abr-testing/.flake8
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ docstring-convention = google

noqa-require-code = true

# per-file-ignores =
per-file-ignores =
abr_testing/protocols/*: C901
1 change: 1 addition & 0 deletions abr-testing/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ slack-sdk = "*"
pandas = "*"
pandas-stubs = "*"
paramiko = "*"
prettier = "*"

[dev-packages]
atomicwrites = "==1.4.1"
Expand Down
Loading

0 comments on commit 0cb41b8

Please sign in to comment.