Skip to content

Commit 77eab3a

Browse files
committed
feat(app-testing): analyses snapshots
1 parent df74f6b commit 77eab3a

File tree

176 files changed

+39089
-198555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+39089
-198555
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Automated Testing Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- 7.1-analyses-battery
7+
workflow_dispatch:
8+
inputs:
9+
TARGET:
10+
description: 'Target branch or tag'
11+
required: true
12+
default: 'edge'
13+
TEST_SOURCE:
14+
description: 'Target for the test code'
15+
required: true
16+
default: 'edge'
17+
schedule:
18+
- cron: '0 7-8 * * *' # Random time between 2-3 AM EST (7-8 AM UTC)
19+
20+
jobs:
21+
build-and-test:
22+
runs-on: ubuntu-latest
23+
env:
24+
TARGET: ${{ github.event.inputs.TARGET || 'v7.1.0-alpha.9' }}
25+
TEST_SOURCE: ${{ github.event.inputs.TEST_SOURCE || '7.1-analyses-battery' }}
26+
27+
steps:
28+
- name: Checkout Repository
29+
uses: actions/checkout@v4
30+
with:
31+
ref: ${{ env.TEST_SOURCE }}
32+
33+
- name: Docker Build
34+
working-directory: app-testing
35+
run: make build-opentrons-analysis
36+
37+
- name: Set up Python 3.12
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: '3.12'
41+
cache: 'pipenv'
42+
cache-dependency-path: app-testing/Pipfile.lock
43+
44+
- name: Setup Python Dependencies
45+
working-directory: app-testing
46+
run: make setup
47+
48+
- name: Run Test
49+
working-directory: app-testing
50+
run: make snapshot-test

.github/workflows/app-testing-lint.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,15 @@ jobs:
2222
runs-on: 'ubuntu-latest'
2323
steps:
2424
- name: Checkout opentrons repo
25-
uses: 'actions/checkout@v3'
25+
uses: 'actions/checkout@v4'
2626

2727
- name: Setup Python
28-
uses: 'actions/setup-python@v4'
28+
uses: 'actions/setup-python@v5'
2929
with:
3030
python-version: '3.12'
3131
cache: 'pipenv'
3232
cache-dependency-path: app-testing/Pipfile.lock
33-
- name: Install Pipenv
34-
run: pip install -U pipenv
35-
- name: Pipenv Install
33+
- name: Setup
3634
id: install
3735
working-directory: ./app-testing
3836
run: make setup

app-testing/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.env
22
results
3+
analysis_results/*.json

app-testing/Makefile

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ruff-check:
1616

1717
.PHONY: mypy
1818
mypy:
19-
python -m pipenv run python -m mypy conftest.py automation tests ci-tools
19+
python -m pipenv run python -m mypy conftest.py automation tests citools
2020

2121
.PHONY: lint
2222
lint:
@@ -36,6 +36,7 @@ test-ci:
3636

3737
.PHONY: setup
3838
setup:
39+
$(MAKE) install-pipenv
3940
python -m pipenv install
4041

4142
.PHONY: teardown
@@ -49,3 +50,23 @@ format-readme:
4950
.PHONY: print-protocols
5051
print-protocols:
5152
python -m pipenv run python print_protocols.py
53+
54+
.PHONY: install-pipenv
55+
install-pipenv:
56+
python -m pip install -U pipenv
57+
58+
.PHONY: snapshot-test
59+
snapshot-test:
60+
python -m pipenv run pytest -k analyses_snapshot_test
61+
62+
.PHONY: snapshot-test-update
63+
snapshot-test-update:
64+
python -m pipenv run pytest -k analyses_snapshot_test --snapshot-update
65+
66+
TARGET ?= v7.1.0-alpha.9
67+
68+
.PHONY: build-opentrons-analysis
69+
build-opentrons-analysis:
70+
@echo "Building docker image for $(TARGET)"
71+
@echo "If you want to build a different version, run 'make build-docker TARGET=<version>'"
72+
docker build --build-arg OPENTRONS_VERSION=$(TARGET) -t opentrons-analysis:$(TARGET) citools/.

app-testing/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Slices of the tests will be selected as candidates for automation and then perfo
1919
1. `make -C app-shell dist-osx`
2020
3. Install Chromedriver
2121
1. in the app-testing directory
22-
2. `sudo ./ci-tools/{YOUR_OS}_get_chromedriver.sh 21.3.1` passing the version of electron in the repository root [package.json](`/opentrons/package.json`) for electron
23-
3. windows example using sudo (scoop install sudo): `sudo .\ci-tools\windows_get_chromedriver.ps1 21.3.1`
22+
2. `sudo ./citools/{YOUR_OS}_get_chromedriver.sh 21.3.1` passing the version of electron in the repository root [package.json](`/opentrons/package.json`) for electron
23+
3. windows example using sudo (scoop install sudo): `sudo .\citools\windows_get_chromedriver.ps1 21.3.1`
2424
4. run `chromedriver --version` to verify
2525
4. Create .env from example.env `cp example.env .env`
2626
1. Fill in values (if there are secrets)

app-testing/analysis_results/.keep-me

Whitespace-only changes.

app-testing/analysis_results/OT2_None_None_2_12_Python310SyntaxRobotAnalysisOnlyError_v7.0.2_analysis.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

app-testing/analysis_results/OT2_None_None_2_12_Python310SyntaxRobotAnalysisOnlyError_v7.1.0-alpha.2_analysis.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

app-testing/analysis_results/OT2_None_None_2_12_Python310SyntaxRobotAnalysisOnlyError_v7.1.0-alpha.3_analysis.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

app-testing/analysis_results/OT2_None_None_2_13_PythonSyntaxError_v7.0.2_analysis.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)