Skip to content

Commit

Permalink
Merge branch 'edge' into abs96_move-lid-command
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau authored Jul 9, 2024
2 parents c89c500 + c40d293 commit b34f5bd
Show file tree
Hide file tree
Showing 1,060 changed files with 2,439,966 additions and 283,046 deletions.
8 changes: 4 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ robot-server/**
shared-data/python/**
hardware-testing/**

# app-testing don't format the json protocols
app-testing/files
# app testing don't format the snapshots
app-testing/tests/__snapshots__
# analyses-snapshot-testing don't format the json protocols
analyses-snapshot-testing/files
# don't format the snapshots
analyses-snapshot-testing/tests/__snapshots__
opentrons-ai-server/package
opentrons-ai-server/api/storage/index/
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# This workflow runs lint on pull requests that touch anything in the app-testing directory
# This workflow runs lint on pull requests that touch anything in the analyses-snapshot-testing directory

name: 'app-testing lint'
name: 'analyses-snapshot-testing lint'

on:
pull_request:
paths:
- 'app-testing/**'
- 'analyses-snapshot-testing/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -17,7 +17,7 @@ defaults:

jobs:
lint:
name: 'app-testing lint'
name: 'analyses-snapshot-testing lint'
timeout-minutes: 5
runs-on: 'ubuntu-latest'
steps:
Expand All @@ -29,20 +29,20 @@ jobs:
with:
python-version: '3.12'
cache: 'pipenv'
cache-dependency-path: app-testing/Pipfile.lock
cache-dependency-path: analyses-snapshot-testing/Pipfile.lock
- name: Setup
id: install
working-directory: ./app-testing
working-directory: ./analyses-snapshot-testing
run: make setup
- name: black-check
if: always() && steps.install.outcome == 'success' || steps.install.outcome == 'skipped'
working-directory: ./app-testing
working-directory: ./analyses-snapshot-testing
run: make black-check
- name: ruff
if: always() && steps.install.outcome == 'success' || steps.install.outcome == 'skipped'
working-directory: ./app-testing
working-directory: ./analyses-snapshot-testing
run: make ruff-check
- name: mypy
if: always() && steps.install.outcome == 'success' || steps.install.outcome == 'skipped'
working-directory: ./app-testing
working-directory: ./analyses-snapshot-testing
run: make mypy
49 changes: 26 additions & 23 deletions .github/workflows/analyses-snapshot-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@ name: Analyses Snapshot Test
on:
workflow_dispatch:
inputs:
TARGET:
description: 'Target branch or tag'
ANALYSIS_REF:
description: 'Branch or tag that provides the analysis output at test runtime'
required: true
default: 'edge'
TEST_SOURCE:
description: 'Target for the test code'
SNAPSHOT_REF:
description: 'Branch or tag that provides the snapshot and test code at test runtime'
required: true
default: 'edge'
schedule:
- cron: '26 7 * * *' # 7:26 AM UTC
pull_request:
paths:
- 'api/**'
- '!api/tests/**'
- '!api/docs/**'
- 'shared-data/**/*'
- '!shared-data/js/**'

Expand All @@ -28,60 +30,61 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
env:
TARGET: ${{ github.event.inputs.TARGET || github.head_ref || 'edge' }}
TEST_SOURCE: ${{ github.event.inputs.TEST_SOURCE || github.head_ref || 'edge' }}
ANALYSIS_REF: ${{ github.event.inputs.ANALYSIS_REF || github.head_ref || 'edge' }}
SNAPSHOT_REF: ${{ github.event.inputs.SNAPSHOT_REF || github.head_ref || 'edge' }}

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ env.TEST_SOURCE }}
ref: ${{ env.SNAPSHOT_REF }}

- name: Docker Build
working-directory: app-testing
working-directory: analyses-snapshot-testing
run: make build-opentrons-analysis

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pipenv'
cache-dependency-path: app-testing/Pipfile.lock
cache-dependency-path: analyses-snapshot-testing/Pipfile.lock

- name: Setup Python Dependencies
working-directory: app-testing
working-directory: analyses-snapshot-testing
run: make setup

- name: Run Test
id: run_test
working-directory: app-testing
working-directory: analyses-snapshot-testing
run: make snapshot-test

- name: Upload Report
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: test-report
path: app-testing/results/
path: analyses-snapshot-testing/results/

- name: Handle Test Failure
if: failure()
working-directory: app-testing
id: handle_failure
if: steps.run_test.outcome == 'failure'
working-directory: analyses-snapshot-testing
run: make snapshot-test-update

- name: Create Snapshot update Request
id: create-pull-request
if: failure()
uses: peter-evans/create-pull-request@v5
id: create_pull_request
if: steps.handle_failure.outcome == 'success'
uses: peter-evans/create-pull-request@v6
with:
commit-message: 'fix(app-testing): snapshot failure capture'
title: 'fix(app-testing): snapshot failure capture'
body: 'This PR is an automated snapshot update request. Please review the changes and merge if they are acceptable or find you bug and fix it.'
branch: 'app-testing/${{ env.TARGET }}-from-${{ env.TEST_SOURCE}}'
base: ${{ env.TEST_SOURCE}}
commit-message: 'fix(analyses-snapshot-testing): snapshot failure capture'
title: 'fix(analyses-snapshot-testing): ${{ env.ANALYSIS_REF }} snapshot failure capture'
body: 'This PR is an automated snapshot update request. Please review the changes and merge if they are acceptable or find your bug and fix it.'
branch: 'analyses-snapshot-testing/${{ env.ANALYSIS_REF }}-from-${{ env.SNAPSHOT_REF}}'
base: ${{ env.SNAPSHOT_REF}}

- name: Comment on PR
if: failure() && github.event_name == 'pull_request'
if: steps.create_pull_request.outcome == 'success' && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/app-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ jobs:
backend-unit-test:
strategy:
matrix:
os: ['windows-2022', 'ubuntu-22.04', 'macos-11']
os: ['windows-2022', 'ubuntu-22.04', 'macos-latest']
name: 'opentrons app backend unit tests on ${{matrix.os}}'
timeout-minutes: 60
runs-on: ${{ matrix.os }}
steps:
- uses: 'actions/checkout@v3'
Expand Down Expand Up @@ -207,13 +208,13 @@ jobs:
if: needs.determine-build-type.outputs.variants != '[]'
strategy:
matrix:
os: ['windows-2022', 'ubuntu-22.04', 'macos-11']
os: ['windows-2022', 'ubuntu-22.04', 'macos-latest']
variant: ${{fromJSON(needs.determine-build-type.outputs.variants)}}
target: ['desktop', 'odd']
exclude:
- os: 'windows-2022'
target: 'odd'
- os: 'macos-11'
- os: 'macos-latest'
target: 'odd'

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/opentrons-ai-server-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Python
uses: 'actions/setup-python@v5'
with:
python-version: '3.12'
python-version: '3.12.4'
cache: 'pipenv'
cache-dependency-path: opentrons-ai-server/Pipfile.lock
- name: Setup
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ update-server/LICENSE
shared-data/python/LICENSE
shared-data/LICENSE
robot-server/LICENSE
performance-metrics/LICENSE

# typescript incremental files
*.tsbuildinfo
Expand Down
3 changes: 2 additions & 1 deletion abr-testing/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ opentrons-hardware = {editable = true, path = "./../hardware", extras=['FLEX']}
opentrons = {editable = true, path = "./../api", extras=['flex-hardware']}
slackclient = "*"
slack-sdk = "*"
scikit-learn = "*"
pandas = "*"
pandas-stubs = "*"


[dev-packages]
atomicwrites = "==1.4.1"
Expand Down
83 changes: 51 additions & 32 deletions abr-testing/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b34f5bd

Please sign in to comment.