Skip to content

Commit dbac2d6

Browse files
committed
Merge branch 'edge' into testing-liquid-classes-api-in-grav-script
2 parents f50606e + a693b6c commit dbac2d6

File tree

524 files changed

+31733
-5841
lines changed

Some content is hidden

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

524 files changed

+31733
-5841
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: 'Set Complex Environment Variables'
2+
description: Composite action using github-script to set complex environment variables.
3+
inputs: {}
4+
runs:
5+
using: 'composite'
6+
steps:
7+
- name: 'Set complex environment variables'
8+
id: set-vars
9+
uses: actions/github-script@v7
10+
with:
11+
script: |
12+
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
13+
buildComplexEnvVars(core, context)
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 'Fix Checkout Tags'
2+
description: >
3+
Composite action to fix actions/checkout odd handling of tags
4+
by fetching and checking out the exact tag reference.
5+
See https://github.com/actions/checkout/issues/290
6+
inputs: {}
7+
runs:
8+
using: 'composite'
9+
steps:
10+
- name: 'Fix actions/checkout odd handling of tags'
11+
if: startsWith(github.ref, 'refs/tags')
12+
shell: bash
13+
env:
14+
REF: ${{ github.ref }}
15+
run: |
16+
git fetch -f origin "${REF}:${REF}"
17+
git checkout "${REF}"

.github/actions/js/setup/action.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 'Setup JS Environment'
2+
description: >
3+
Composite action to fix tag handling in checkout,
4+
setup Node.js, install udev for USB detection, cache Yarn/NPM caches,
5+
and perform JS setup.
6+
7+
inputs: {}
8+
9+
runs:
10+
using: 'composite'
11+
steps:
12+
- uses: ./.github/actions/git/resolve-tag
13+
- uses: ./.github/actions/environment/complex-variables
14+
- name: 'Setup Node'
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '22.11.0'
18+
cache: 'yarn'
19+
20+
- name: 'Install udev for USB-detection'
21+
if: runner.os == 'Linux'
22+
shell: bash
23+
run: sudo apt-get update && sudo apt-get install libudev-dev
24+
25+
- name: 'Setup JS'
26+
shell: bash
27+
run: |
28+
make setup-js

.github/workflows/app-test-build-deploy.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ env:
5252
jobs:
5353
js-unit-test:
5454
# unit tests for the app's view layer (not the node layer)
55-
runs-on: 'ubuntu-22.04'
55+
runs-on: 'ubuntu-24.04'
5656
name: 'opentrons app frontend unit tests'
5757
timeout-minutes: 60
5858
steps:
@@ -386,7 +386,7 @@ jobs:
386386
387387
deploy-release-app:
388388
name: 'Deploy built app artifacts to S3'
389-
runs-on: 'ubuntu-22.04'
389+
runs-on: 'ubuntu-24.04'
390390
needs:
391391
['js-unit-test', 'backend-unit-test', 'build-app', 'determine-build-type']
392392
if: contains(fromJSON(needs.determine-build-type.outputs.variants), 'release') || contains(fromJSON(needs.determine-build-type.outputs.variants), 'internal-release')

.github/workflows/components-test-build-deploy.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
js-unit-test:
4242
name: 'components unit tests'
4343
timeout-minutes: 30
44-
runs-on: 'ubuntu-22.04'
44+
runs-on: 'ubuntu-24.04'
4545
steps:
4646
- uses: 'actions/checkout@v4'
4747
- uses: 'actions/setup-node@v4'
@@ -75,7 +75,7 @@ jobs:
7575

7676
build-components-storybook:
7777
name: 'build components artifact'
78-
runs-on: 'ubuntu-22.04'
78+
runs-on: 'ubuntu-24.04'
7979
if: github.event_name != 'pull_request'
8080
needs: ['js-unit-test']
8181
steps:
@@ -135,7 +135,7 @@ jobs:
135135
136136
deploy-components:
137137
name: 'deploy components storybook artifact to S3'
138-
runs-on: 'ubuntu-22.04'
138+
runs-on: 'ubuntu-24.04'
139139
needs:
140140
['js-unit-test', 'build-components-storybook', 'determine-build-type']
141141
if: needs.determine-build-type.outputs.type != 'none'

.github/workflows/js-check.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ env:
3939
jobs:
4040
checks:
4141
name: 'js checks'
42-
runs-on: 'ubuntu-22.04'
42+
runs-on: 'ubuntu-24.04'
4343
timeout-minutes: 20
4444
steps:
4545
- uses: 'actions/checkout@v4'

.github/workflows/ll-test-build-deploy.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
js-unit-test:
4141
name: 'labware library unit tests'
4242
timeout-minutes: 20
43-
runs-on: 'ubuntu-22.04'
43+
runs-on: 'ubuntu-24.04'
4444
steps:
4545
- uses: 'actions/checkout@v4'
4646
- uses: 'actions/setup-node@v4'
@@ -83,7 +83,7 @@ jobs:
8383
name: 'labware library e2e tests'
8484
needs: ['js-unit-test']
8585
timeout-minutes: 30
86-
runs-on: 'ubuntu-22.04'
86+
runs-on: 'ubuntu-24.04'
8787
steps:
8888
- uses: 'actions/checkout@v4'
8989
# https://github.com/actions/checkout/issues/290
@@ -123,7 +123,7 @@ jobs:
123123
name: 'build labware library artifact'
124124
needs: ['js-unit-test']
125125
timeout-minutes: 30
126-
runs-on: 'ubuntu-22.04'
126+
runs-on: 'ubuntu-24.04'
127127
if: github.event_name != 'pull_request'
128128
steps:
129129
- uses: 'actions/checkout@v4'
@@ -170,7 +170,7 @@ jobs:
170170
path: labware-library/dist
171171
deploy-ll:
172172
name: 'deploy LL artifact to S3'
173-
runs-on: 'ubuntu-22.04'
173+
runs-on: 'ubuntu-24.04'
174174
needs: ['js-unit-test', 'e2e-test', 'build-ll']
175175
if: github.event_name != 'pull_request'
176176
steps:

.github/workflows/opentrons-ai-client-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ env:
3535

3636
jobs:
3737
js-unit-test:
38-
runs-on: 'ubuntu-22.04'
38+
runs-on: 'ubuntu-24.04'
3939
name: 'opentrons ai frontend unit tests'
4040
timeout-minutes: 60
4141
steps:

.github/workflows/pd-test-build-deploy.yaml

+44-135
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
- 'components/**'
1212
- 'package.json'
1313
- '.github/workflows/pd-test-build-deploy.yaml'
14+
- '.github/actions/js/setup/action.yml'
15+
- '.github/actions/git/resolve-tag/action.yml'
16+
- '.github/actions/environment/complex-variables/action.yml'
1417
push:
1518
paths:
1619
- 'protocol-designer/**'
@@ -19,6 +22,9 @@ on:
1922
- 'components/**'
2023
- 'package.json'
2124
- '.github/workflows/pd-test-build-deploy.yaml'
25+
- '.github/actions/js/setup/action.yml'
26+
- '.github/actions/git/resolve-tag/action.yml'
27+
- '.github/actions/environment/complex-variables/action.yml'
2228
branches:
2329
- '**'
2430
tags:
@@ -37,126 +43,42 @@ env:
3743
CI: true
3844

3945
jobs:
40-
js-unit-test:
46+
unit-test:
4147
name: 'protocol designer unit tests'
42-
runs-on: 'ubuntu-22.04'
43-
timeout-minutes: 30
48+
runs-on: 'ubuntu-24.04'
49+
timeout-minutes: 20
4450
steps:
45-
- uses: 'actions/checkout@v4'
46-
# https://github.com/actions/checkout/issues/290
47-
- name: 'Fix actions/checkout odd handling of tags'
48-
if: startsWith(github.ref, 'refs/tags')
49-
run: |
50-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
51-
git checkout ${{ github.ref }}
52-
- uses: 'actions/setup-node@v4'
53-
with:
54-
node-version: '22.11.0'
55-
- name: 'install udev for usb-detection'
56-
run: |
57-
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
58-
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
59-
sudo apt-get update && sudo apt-get install libudev-dev
60-
- name: 'cache yarn cache'
61-
uses: actions/cache@v2
62-
with:
63-
path: |
64-
${{ github.workspace }}/.yarn-cache
65-
${{ github.workspace }}/.npm-cache
66-
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
67-
restore-keys: |
68-
js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-
69-
- name: 'setup-js'
70-
run: |
71-
npm config set cache ./.npm-cache
72-
yarn config set cache-folder ./.yarn-cache
73-
make setup-js
74-
- name: 'run PD unit tests'
51+
- name: 'Checkout Repository'
52+
uses: actions/checkout@v4
53+
- uses: ./.github/actions/js/setup
54+
- name: 'run unit tests'
7555
run: make -C protocol-designer test-cov
7656
- name: 'Upload coverage report'
77-
uses: codecov/codecov-action@v3
57+
uses: codecov/codecov-action@v5
7858
with:
79-
files: ./coverage/lcov.info
8059
flags: protocol-designer
60+
token: ${{ secrets.CODECOV_TOKEN }}
8161

8262
e2e-test:
83-
name: 'pd e2e tests'
84-
needs: ['js-unit-test']
85-
timeout-minutes: 30
86-
strategy:
87-
matrix:
88-
os: ['ubuntu-22.04']
89-
runs-on: '${{ matrix.os }}'
90-
steps:
91-
- uses: 'actions/checkout@v4'
92-
with:
93-
fetch-depth: 0
94-
# https://github.com/actions/checkout/issues/290
95-
- name: 'Fix actions/checkout odd handling of tags'
96-
if: startsWith(github.ref, 'refs/tags')
97-
run: |
98-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
99-
git checkout ${{ github.ref }}
100-
- uses: 'actions/setup-node@v4'
101-
with:
102-
node-version: '22.11.0'
103-
- name: 'install udev for usb-detection'
104-
if: startsWith(matrix.os, 'ubuntu')
105-
run: |
106-
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
107-
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
108-
sudo apt-get update && sudo apt-get install libudev-dev
109-
- name: 'cache yarn cache'
110-
uses: actions/cache@v3
111-
with:
112-
path: |
113-
${{ github.workspace }}/.yarn-cache
114-
${{ github.workspace }}/.npm-cache
115-
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
116-
restore-keys: |
117-
js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-
118-
- name: 'setup-js'
119-
run: |
120-
npm config set cache ./.npm-cache
121-
yarn config set cache-folder ./.yarn-cache
122-
make setup-js
123-
- name: 'test-e2e'
124-
run: make -C protocol-designer test-e2e
63+
name: 'protocol designer e2e tests'
64+
runs-on: 'ubuntu-24.04'
65+
timeout-minutes: 20
66+
steps:
67+
- name: 'Checkout Repository'
68+
uses: actions/checkout@v4
69+
- uses: ./.github/actions/js/setup
70+
- name: 'run test-e2e'
71+
run: make -C protocol-designer test-e2e
72+
12573
build-pd:
126-
name: 'build protocol designer artifact'
127-
needs: ['js-unit-test']
128-
runs-on: 'ubuntu-22.04'
74+
timeout-minutes: 20
75+
name: 'build protocol designer'
76+
needs: ['unit-test', 'e2e-test']
77+
runs-on: 'ubuntu-24.04'
12978
if: github.event_name != 'pull_request'
13079
steps:
131-
- uses: 'actions/checkout@v4'
132-
with:
133-
fetch-depth: 0
134-
# https://github.com/actions/checkout/issues/290
135-
- name: 'Fix actions/checkout odd handling of tags'
136-
if: startsWith(github.ref, 'refs/tags')
137-
run: |
138-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
139-
git checkout ${{ github.ref }}
140-
- uses: 'actions/setup-node@v4'
141-
with:
142-
node-version: '22.11.0'
143-
- name: 'install udev for usb-detection'
144-
run: |
145-
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
146-
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
147-
sudo apt-get update && sudo apt-get install libudev-dev
148-
- name: 'cache yarn cache'
149-
uses: actions/cache@v3
150-
with:
151-
path: |
152-
${{ github.workspace }}/.yarn-cache
153-
${{ github.workspace }}/.npm-cache
154-
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
155-
- name: 'setup-js'
156-
run: |
157-
npm config set cache ./.npm-cache
158-
yarn config set cache-folder ./.yarn-cache
159-
make setup-js
80+
- uses: actions/checkout@v4
81+
- uses: ./.github/actions/js/setup
16082
- name: 'build PD'
16183
env:
16284
OT_PD_MIXPANEL_ID: ${{ secrets.OT_PD_MIXPANEL_ID }}
@@ -168,40 +90,28 @@ jobs:
16890
with:
16991
name: 'pd-artifact'
17092
path: protocol-designer/dist
93+
17194
deploy-pd:
172-
name: 'deploy PD artifact to S3'
173-
runs-on: 'ubuntu-22.04'
174-
needs: ['js-unit-test', 'build-pd']
95+
timeout-minutes: 10
96+
name: 'deploy protocol designer'
97+
needs: ['build-pd']
98+
runs-on: 'ubuntu-24.04'
17599
if: github.event_name != 'pull_request'
176100
steps:
177-
- uses: 'actions/checkout@v4'
178-
# https://github.com/actions/checkout/issues/290
179-
- name: 'Fix actions/checkout odd handling of tags'
180-
if: startsWith(github.ref, 'refs/tags')
181-
run: |
182-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
183-
git checkout ${{ github.ref }}
184-
- uses: 'actions/setup-node@v4'
185-
with:
186-
node-version: '22.11.0'
187-
- name: 'install udev for usb-detection'
188-
run: |
189-
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
190-
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
191-
sudo apt-get update && sudo apt-get install libudev-dev
192-
- name: 'set complex environment variables'
193-
id: 'set-vars'
194-
uses: actions/github-script@v6
195-
with:
196-
script: |
197-
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
198-
buildComplexEnvVars(core, context)
101+
- name: 'Checkout Repository'
102+
uses: actions/checkout@v4
103+
104+
- uses: ./.github/actions/git/resolve-tag
105+
106+
- uses: ./.github/actions/environment/complex-variables
107+
199108
- name: 'download PD build'
200109
uses: 'actions/download-artifact@v4'
201110
with:
202111
name: pd-artifact
203112
path: ./dist
204113
- name: 'configure ot3 s3 deploy creds and deploy'
114+
shell: bash
205115
env:
206116
AWS_ACCESS_KEY_ID: ${{ secrets.PD_S3_SANDBOX_KEY_ID }}
207117
AWS_SECRET_ACCESS_KEY: ${{ secrets.PD_S3_SANDBOX_SECRET }}
@@ -218,4 +128,3 @@ jobs:
218128
# invalidate both sandbox.opentrons.com and www.sandbox.opentrons.com cloudfront caches
219129
aws cloudfront create-invalidation --distribution-id ${{ secrets.PD_CLOUDFRONT_SANDBOX_DISTRIBUTION_ID }} --paths "/*" --profile deploy
220130
aws cloudfront create-invalidation --distribution-id ${{ secrets.PD_CLOUDFRONT_SANDBOX_WWW_DISTRIBUTION_ID }} --paths "/*" --profile deploy
221-
shell: bash

.github/workflows/react-api-client-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
js-unit-test:
3535
name: 'api-client and react-api-client unit tests'
3636
timeout-minutes: 30
37-
runs-on: 'ubuntu-22.04'
37+
runs-on: 'ubuntu-24.04'
3838
steps:
3939
- uses: 'actions/checkout@v4'
4040
- uses: 'actions/setup-node@v4'

0 commit comments

Comments
 (0)