Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(monorepo): migrate frontend bundling from webpack to vite #14405

Merged
merged 365 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
365 commits
Select commit Hold shift + click to select a range
3eeb478
fix app dependencies for app production builds
shlokamin Feb 26, 2024
aaf4488
set up pnpm in app github workflow
shlokamin Feb 26, 2024
70c7432
trigger app builds on manual triggers
shlokamin Feb 26, 2024
dd6b428
REVERT LATER: build app without tests passing
shlokamin Feb 26, 2024
c95915d
REVERT LATER: add hack build app for vite migration branch
shlokamin Feb 26, 2024
1b26b19
start test migration for protocl setup and modules
b-cooper Feb 26, 2024
b9d5b6a
specify electron-localshortcut as a dependency
shlokamin Feb 26, 2024
511c365
install deps so lock file is correct
shlokamin Feb 26, 2024
b96cb2b
update some devices tests
jerader Feb 26, 2024
e728cf7
add cal block fixture
mjhuff Feb 26, 2024
1b23c98
migrate organisms/devices/hooks to vitest
ncdiehl11 Feb 26, 2024
2d78b26
migrate portal to use createPortal
b-cooper Feb 26, 2024
61c6a85
Merge branch 'protocol_designer-migrate-webpack-to-vite' of github.co…
b-cooper Feb 27, 2024
0644c03
more vitest migrations for organisms D -> I
jerader Feb 27, 2024
32745da
update CustomLabwareOverflowMenu test
koji Feb 27, 2024
f1084ea
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Feb 27, 2024
3ca88bc
update LabwareCard test for vitest
koji Feb 27, 2024
8ee9447
app/src/pages vitest migration
smb2268 Feb 26, 2024
41f947a
migrate step-generation test to vitest
jerader Feb 27, 2024
25ad07f
update tests that are in L* for vitest migration
koji Feb 27, 2024
9a80146
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Feb 27, 2024
6a74fcb
update P* tests for vitest migration
koji Feb 28, 2024
6fcf0de
C* components test updates
mjhuff Feb 27, 2024
5acb14d
update some components tests and add react-redux to package.json
jerader Feb 28, 2024
a0396ed
Some /components vitest updates
smb2268 Feb 28, 2024
38a17a1
migrate rest of components tests
jerader Feb 28, 2024
24cef57
update tests under organisms/P* for vitest migration
koji Feb 28, 2024
4e3660d
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Feb 28, 2024
5f29ad3
standardize mocking of file-saver to avoid sterr dump
b-cooper Feb 28, 2024
b0ebbbb
Merge branch 'protocol_designer-migrate-webpack-to-vite' of github.co…
b-cooper Feb 28, 2024
a0633c1
add electron is dev as a dep
shlokamin Feb 26, 2024
b4a2749
app shell config fix ups
shlokamin Feb 26, 2024
9105de8
fix app production build
shlokamin Feb 28, 2024
0bcf663
update P* tests for vitest migration
koji Feb 28, 2024
e5e345b
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Feb 28, 2024
2855a85
added partialComponentPropsMatcher to test components
koji Feb 28, 2024
ed01ecf
Update ProtocolSetupLabware.test.tsx
koji Feb 29, 2024
67a086f
explicitly unpack node usb and serialport
shlokamin Feb 29, 2024
fa5869f
nevermind do not unpack native modules from electron builder
shlokamin Feb 29, 2024
f3400d8
exclude node modules from pre bundling
shlokamin Feb 29, 2024
8611daf
migrate organisms M -> O
brenthagen Feb 29, 2024
6088746
use all_protocols translation key for ODD navigation
brenthagen Feb 29, 2024
d219837
exclude node modules in common js options
shlokamin Feb 29, 2024
bc85fee
updated tests for P* cases
koji Feb 29, 2024
6ca27b4
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Feb 29, 2024
a8aa014
update some more tests
jerader Feb 29, 2024
02b3a39
the rest test case phase 1
koji Feb 29, 2024
b3dac06
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Feb 29, 2024
91b3722
go back to using yarn
shlokamin Feb 29, 2024
a6f4651
the send phase of the rest tests
koji Feb 29, 2024
7a03259
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Feb 29, 2024
08190d3
revert more yarn stuff
shlokamin Feb 29, 2024
881ab8c
the third phase of the rest of tests
koji Feb 29, 2024
60d03ef
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Feb 29, 2024
2043460
more package changes to get stuff working with yarn
shlokamin Feb 29, 2024
9b82329
do not use hard links when building app
shlokamin Feb 29, 2024
c479d4a
update the rest tests for vitest migration
koji Feb 29, 2024
fa44e54
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Feb 29, 2024
aee12fe
the last phase of tests under nested folders
koji Mar 1, 2024
20504ec
migration react-api-client
jerader Mar 1, 2024
cd2348d
only export robot state fixtures outside of SG
shlokamin Mar 1, 2024
8a732ef
move around SG fixtures so PD does not accidentally import test code
shlokamin Mar 1, 2024
0728585
update ProtocolRunHeader test
koji Mar 1, 2024
aaaab0b
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 1, 2024
70d1ddc
migrate discovery-client and api-client tests
jerader Mar 1, 2024
17d47a6
fix Protocol Run Header test mocking issue
koji Mar 1, 2024
94e6077
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 1, 2024
485addb
migrate shared-data tests to vitest
jerader Mar 1, 2024
8fb9f62
fix app test errors
koji Mar 1, 2024
2742632
work through lint
b-cooper Mar 1, 2024
62ee667
Merge branch 'protocol_designer-migrate-webpack-to-vite' of github.co…
b-cooper Mar 1, 2024
4fd27fd
fix TS errors
shlokamin Mar 1, 2024
120cd81
update makefile to use vitest
shlokamin Mar 1, 2024
26f7624
update test for vitest migration
koji Mar 1, 2024
67f301b
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 1, 2024
32718c8
import vitest for migration
koji Mar 1, 2024
e4afa9d
fix json import and import vitest
koji Mar 1, 2024
28b626f
add vitest and modify json import
koji Mar 1, 2024
1a6d6fd
modify mock func
koji Mar 1, 2024
dfc4ba9
Update DeckSetup.test.tsx
koji Mar 2, 2024
bcb88ae
Update CalibrateTipLength.test.tsx
koji Mar 2, 2024
379af0a
comment out expect temporarily
koji Mar 4, 2024
793843b
fix useHistory mocking
koji Mar 4, 2024
5cd60fb
remove fireEvent since it's not used
koji Mar 4, 2024
56f6d39
Merge branch 'protocol_designer-migrate-webpack-to-vite' of github.co…
b-cooper Mar 4, 2024
92f9d81
migrate 3 more tests
jerader Mar 4, 2024
eda4f56
remove when for linting
koji Mar 4, 2024
e11059c
lint fixes
mjhuff Mar 4, 2024
b33d5e0
Merge branch 'edge' into protocol_designer-migrate-webpack-to-vite
shlokamin Mar 4, 2024
4628372
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
shlokamin Mar 4, 2024
1075c13
lint again
mjhuff Mar 4, 2024
3095e9b
Update ProtocolRunHeader.test.tsx
koji Mar 4, 2024
3bf03fb
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 4, 2024
414fe2e
remove vitest ci cli flag because it does not exist
shlokamin Mar 4, 2024
980133a
fix test errors
koji Mar 4, 2024
11e2c0e
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
shlokamin Mar 4, 2024
48b182f
fix fakeTimer tests
koji Mar 4, 2024
86b3e96
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 4, 2024
c2eeda5
remove vitest call to collectCoverageFrom because it does not exist
shlokamin Mar 4, 2024
c99424d
introduce vitest
koji Mar 4, 2024
3267c49
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 4, 2024
672dc93
add vitest coverage dep
shlokamin Mar 4, 2024
8f902ab
try downgrading coverage v8
shlokamin Mar 4, 2024
7a57609
Update http.test.ts
koji Mar 4, 2024
b4ec70a
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 4, 2024
45efc4f
allowonly true
shlokamin Mar 4, 2024
df5aae3
Update hooks.test.ts
koji Mar 4, 2024
9db944f
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 4, 2024
abe1608
remove tests
koji Mar 4, 2024
8eedf40
remove privacy component
koji Mar 4, 2024
03d0496
Update CheckCalibration.test.tsx
koji Mar 5, 2024
bc3e16c
Update validation.test.ts
koji Mar 5, 2024
6e15778
Update release-manifest.test.ts
koji Mar 5, 2024
d4a346a
Update network-interfaces.test.ts
koji Mar 5, 2024
64da3a9
Update writeFailedAnalysis.test.ts
koji Mar 5, 2024
b5da1eb
Update dispatch.test.ts
koji Mar 5, 2024
763d4f5
Update definitions.test.ts
koji Mar 5, 2024
c1fb9a1
Update dialogs.test.ts
koji Mar 5, 2024
4e2aaf3
Update useNotifyService.test.ts
koji Mar 5, 2024
cd4d7ad
remove AnalyticsToggle
koji Mar 5, 2024
c9f894d
update format with prettier
koji Mar 5, 2024
1e64e05
Update http.test.ts
koji Mar 5, 2024
89d9323
jest -> vi
koji Mar 5, 2024
c3e6080
Update dialogs.test.ts
koji Mar 5, 2024
1ebd2ce
add discovery-client
koji Mar 5, 2024
ef7e123
update some more tests
jerader Mar 5, 2024
2e62368
Update electron-builder.config.js
koji Mar 5, 2024
cf753e0
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 5, 2024
52bf5f9
mock electron
shlokamin Mar 5, 2024
d2632c1
Update update.test.ts
koji Mar 5, 2024
077ee0e
update app shell migration tests
shlokamin Mar 5, 2024
a65b1ee
Update migrate.test.ts
koji Mar 5, 2024
87aba6e
Update update.test.ts
koji Mar 5, 2024
fcb3bc2
fix a few more tests
jerader Mar 5, 2024
0114ed9
Update update.test.ts
koji Mar 5, 2024
c256db8
add global to _OPENTRONS_PROJECT_
koji Mar 5, 2024
343c769
fix linting error
koji Mar 5, 2024
e779b20
mock electron-store
shlokamin Mar 5, 2024
84f6570
Update DraggableStepItems.tsx
koji Mar 5, 2024
cb1537f
fix linting error
koji Mar 5, 2024
3bf03d6
fix linting errors
koji Mar 5, 2024
f654e35
more tet fixes
jerader Mar 5, 2024
21175f8
app shell tests
mjhuff Mar 5, 2024
34e50e6
protocolAnalysis test fix
mjhuff Mar 5, 2024
811e5e0
delete unneeded files in PD
jerader Mar 5, 2024
bf169e0
delete ConnectedSlotMap since its no longer needed
jerader Mar 5, 2024
6faa0aa
app-shell fixes
mjhuff Mar 5, 2024
4dd72b5
fix check-js errors
koji Mar 5, 2024
7d83dea
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 5, 2024
af347ef
Update SetupModulesMap.test.tsx
koji Mar 5, 2024
1b16697
fix path for check-js
koji Mar 5, 2024
0127138
add temporary type
koji Mar 5, 2024
c4a435a
remove webpack-config
mjhuff Mar 5, 2024
c923579
fix check-js errors
koji Mar 5, 2024
bc97bf6
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 5, 2024
c3b4660
fix check-js errors
koji Mar 5, 2024
ad0d36f
fix a mock error
koji Mar 5, 2024
ac0a120
Update SetupStep.test.tsx
koji Mar 5, 2024
802b06e
fix check-js errors
koji Mar 5, 2024
19a90f3
fix check-js errors
koji Mar 5, 2024
2468383
Update ProtocolDetails.test.tsx
koji Mar 5, 2024
e886e9f
remove unused lines
koji Mar 5, 2024
4ce729a
usb test ignore
mjhuff Mar 5, 2024
aebac48
Update useHealth.ts
koji Mar 5, 2024
26a0198
Update hooks.test.ts
koji Mar 5, 2024
3a71a97
fix a wrong mock
koji Mar 5, 2024
320eebd
Update ProtocolRunHeader.test.tsx
koji Mar 5, 2024
2b07c24
Update ProtocolRunSetup.test.tsx
koji Mar 5, 2024
dc19d3a
chnage setup-vitest file extension for lint
koji Mar 5, 2024
6008b86
fix app shell discovery test
shlokamin Mar 5, 2024
bccfdee
fix app shell odd tests
shlokamin Mar 5, 2024
234e9c5
fix call to setup vitest
shlokamin Mar 5, 2024
b37ca3a
turn test threading back on
shlokamin Mar 5, 2024
433b11e
Update SetupLabwareMap.test.tsx
koji Mar 5, 2024
72a8a79
fix some lint errors
jerader Mar 6, 2024
773c2a4
Update ProtocolRunHeader.test.tsx
koji Mar 6, 2024
c8373f5
testmigrate organisms/devices/protocolrun tests to vitest and update …
ncdiehl11 Feb 28, 2024
4d9314f
some lint and typecheck fixes
mjhuff Mar 6, 2024
2433541
fix odd build issue
mjhuff Mar 6, 2024
3e0b211
fix check-js errors
koji Mar 6, 2024
ad5874c
export json to fix import errors
koji Mar 6, 2024
98597ea
add ts-expect-error temporarily
koji Mar 6, 2024
ee37d95
fix this test
mjhuff Mar 6, 2024
51a0c4b
fix scripts and labware-designer tests
jerader Mar 6, 2024
55fdb76
fix running protocol test
shlokamin Mar 6, 2024
b882beb
Update MoveLabwareOnDeck.tsx
koji Mar 6, 2024
2920558
test fixes Pt. 47
mjhuff Mar 6, 2024
4fe94ad
last lint fix????
mjhuff Mar 6, 2024
d967cb2
fix test error
mjhuff Mar 6, 2024
57eda49
fix lint issue
koji Mar 6, 2024
9eec04c
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 6, 2024
ce88a2c
fix format issue
koji Mar 6, 2024
6259bb9
fix check-js error
koji Mar 6, 2024
68fcc00
css lint fixes
mjhuff Mar 6, 2024
8a4516d
fix typechecks error
koji Mar 6, 2024
2fd10c6
test fix for typechecks
koji Mar 6, 2024
7b8248d
buttons.module.css fixes
mjhuff Mar 6, 2024
c8784e3
fix typechecks errors
koji Mar 6, 2024
a04ef2a
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 6, 2024
52aca07
no border duplicate
mjhuff Mar 6, 2024
8df0dab
Update Select.tsx
koji Mar 6, 2024
80f3c0e
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 6, 2024
c3d3c70
remove ts-error
koji Mar 6, 2024
090268a
remove jest
koji Mar 6, 2024
11a4bed
remove unnecessary jest.mock
koji Mar 6, 2024
eab60f4
fix import
koji Mar 6, 2024
271040e
fix css import statement for react simple keyboard
shlokamin Mar 6, 2024
706857b
Update setup-global-mocks.js
koji Mar 6, 2024
d5e50b4
clean up import statements to remove warnings
koji Mar 6, 2024
d081409
Update setup-global-mocks.js
koji Mar 6, 2024
3181abb
remove jest config and call to pnpm
shlokamin Mar 6, 2024
6153948
remove setup-global-mocks.js
koji Mar 6, 2024
416cf7d
switch jest to vitest in contributing doc
koji Mar 6, 2024
b73e2a7
git mergeback
mjhuff Mar 6, 2024
6579738
remove jest.fn()
koji Mar 6, 2024
5f1e413
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 6, 2024
c3b86f0
Update ProtocolRunModuleControls.test.tsx
koji Mar 6, 2024
12a9bd8
fix a hover test case of AlertPrimaryButton
koji Mar 6, 2024
b5a6e7d
test fun stuff
mjhuff Mar 6, 2024
812ff6f
Merge branch 'edge' into protocol_designer-migrate-webpack-to-vite
mjhuff Mar 7, 2024
b67728b
test fixes :)
mjhuff Mar 7, 2024
405e9bc
lint and type fixes
mjhuff Mar 7, 2024
88e81e2
atone for my sins
mjhuff Mar 7, 2024
8b74c94
prettier
mjhuff Mar 7, 2024
9b7e753
makefile update
mjhuff Mar 7, 2024
b02c741
final(???) test fixes
mjhuff Mar 7, 2024
c3ba64e
fix estop stories
koji Mar 7, 2024
698a549
Merge fix for LocationConflictModal
mjhuff Mar 7, 2024
18560fa
fix labware-library css
jerader Mar 7, 2024
0d51cb8
merge fix pipettewizardflows
mjhuff Mar 7, 2024
dfd1d84
fix lint-css
jerader Mar 7, 2024
4867370
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
jerader Mar 7, 2024
97fad5d
update cypress configs
shlokamin Mar 7, 2024
3f28bd3
update cypress port
shlokamin Mar 7, 2024
dcdcacb
do not import from app
mjhuff Mar 7, 2024
62cba5a
make labware library index html show correc title
shlokamin Mar 7, 2024
9c7040b
Update DEV_SETUP.md
koji Mar 7, 2024
81526df
mark discovery client and shared data as first class deps for app she…
shlokamin Mar 7, 2024
5b68869
fix stories for gripper wizard and intervention modal
koji Mar 7, 2024
b6b5d29
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 7, 2024
9ba70bf
keyboard fixes
mjhuff Mar 7, 2024
72b5eba
fix MoveLabwareIntervention stories
koji Mar 7, 2024
e0bb082
Merge branch 'protocol_designer-migrate-webpack-to-vite' of https://g…
koji Mar 7, 2024
90dee0c
electron-builder odd electron version is now 23.3.13
mjhuff Mar 7, 2024
da47725
add app/src/atoms/SoftwareKeyboard/index.css to ignore files of lint-css
koji Mar 8, 2024
913644c
stylelint fixes
mjhuff Mar 8, 2024
ee19c4d
move TS files outside of fixtures dir so python can use fixtures
shlokamin Mar 8, 2024
c5a0cc9
remove pnpm actions and readd yarn cache
shlokamin Mar 8, 2024
76ef49d
fix up syntax errors in gh actions
shlokamin Mar 8, 2024
16b00d2
try to fix gh action syntax errors again
shlokamin Mar 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
**/venv/**
.opentrons_config
**/tsconfig*.json

**/vite.config.ts
# prettier
**/package.json
**/CHANGELOG.md
lerna.json
!api/release-notes.md
!app-shell/build/release-notes.md

Expand Down
13 changes: 12 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = {
'plugin:react/recommended',
'prettier',
'plugin:json/recommended',
'plugin:storybook/recommended',
],

plugins: ['react', 'react-hooks', 'json', 'jest', 'testing-library'],
Expand Down Expand Up @@ -89,6 +90,11 @@ module.exports = {
'@typescript-eslint/unbound-method': 'warn',
'@typescript-eslint/consistent-generic-constructors': 'warn',
'@typescript-eslint/no-misused-promises': 'warn',
// need this to be able to pass in css prop into raw elements (babel adds this at build time for styled-components)
'react/no-unknown-property': [
'error',
{ ignore: ['css', 'indeterminate'] },
],
},
},
{
Expand All @@ -98,6 +104,7 @@ module.exports = {
'**/__mocks__/**.@(js|ts|tsx)',
'**/__utils__/**.@(js|ts|tsx)',
'**/__fixtures__/**.@(js|ts|tsx)',
'**/fixtures/**.@(js|ts|tsx)',
'scripts/*.@(js|ts|tsx)',
],
env: {
Expand All @@ -108,7 +115,7 @@ module.exports = {
'jest/expect-expect': 'off',
'jest/no-standalone-expect': 'off',
'jest/no-disabled-tests': 'error',
'jest/consistent-test-it': 'error',
'jest/consistent-test-it': ['error', { fn: 'it' }],
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
Expand All @@ -127,6 +134,7 @@ module.exports = {
env: { jest: true },
extends: ['plugin:testing-library/react'],
rules: {
'testing-library/no-manual-cleanup': 'off',
'testing-library/prefer-screen-queries': 'warn',
},
},
Expand All @@ -140,6 +148,9 @@ module.exports = {
{
files: ['**/cypress/**'],
extends: ['plugin:cypress/recommended'],
rules: {
'cypress/unsafe-to-chain-command': 'warn',
},
},
],
}
58 changes: 21 additions & 37 deletions .github/workflows/app-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- 'app-shell-odd/**/*'
- 'components/**/*'
- 'shared-data/**/*'
- 'webpack-config/**/*'
- 'discovery-client/**/*'
- '*.js'
- 'scripts/**/*'
Expand All @@ -32,7 +31,6 @@ on:
- 'app-shell-odd/**/*'
- 'components/**/*'
- 'shared-data/**/*'
- 'webpack-config/**/*'
- 'discovery-client/**/*'
- '*.js'
- '*.json'
Expand Down Expand Up @@ -62,6 +60,9 @@ jobs:
- uses: 'actions/setup-node@v3'
with:
node-version: '18.19.0'
- uses: pnpm/action-setup@v3
with:
version: 8
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
Expand All @@ -71,17 +72,9 @@ jobs:
script: |
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
buildComplexEnvVars(core, context)
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.npm-cache/_prebuild
${{ github.workspace }}/.yarn-cache
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: 'setup-js'
run: |
npm config set cache ${{ github.workspace }}/.npm-cache
yarn config set cache-folder ${{ github.workspace }}/.yarn-cache
make setup-js
- name: 'test frontend packages'
run: |
Expand Down Expand Up @@ -111,6 +104,9 @@ jobs:
- uses: 'actions/setup-node@v3'
with:
node-version: '18.19.0'
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-python@v4
with:
python-version: '3.10'
Expand All @@ -128,20 +124,12 @@ jobs:
script: |
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
buildComplexEnvVars(core, context)
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.npm-cache/_prebuild
${{ github.workspace }}/.yarn-cache
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: setup-js
run: |
npm config set cache ${{ github.workspace }}/.npm-cache
yarn config set cache-folder ${{ github.workspace }}/.yarn-cache
make setup-js
- name: 'test native(er) packages'
run: make test-js-internal tests="app-shell/src app-shell-odd/src discovery-client/src" cov_opts="--coverage=true --ci=true --collectCoverageFrom='(app-shell|app-shell-odd| discovery-client)/src/**/*.(js|ts|tsx)'"
run: make test-js-internal tests="app-shell/src app-shell-odd/src discovery-client/src" cov_opts="--coverage=true"
- name: 'Upload coverage report'
uses: 'codecov/codecov-action@v3'
with:
Expand Down Expand Up @@ -182,6 +170,11 @@ jobs:
echo "both develop builds for edge"
echo 'variants=["release", "internal-release"]' >> $GITHUB_OUTPUT
echo 'type=develop' >> $GITHUB_OUTPUT
elif [ "${{ format('{0}', endsWith(github.ref, 'protocol_designer-migrate-webpack-to-vite')) }}" = "true" ] ; then
echo "REMOVE THIS AFTER APP TESTS ARE MIGRATED"
echo "HACK: run release builds for the vite migration branch"
echo 'variants=["release", "internal-release"]' >> $GITHUB_OUTPUT
echo 'type=develop' >> $GITHUB_OUTPUT
elif [ "${{ format('{0}', endsWith(github.ref, 'app-build-internal')) }}" = "true" ] ; then
echo "internal-release builds for app-build-internal suffixes"
echo 'variants=["internal-release"]' >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -244,6 +237,9 @@ jobs:
- uses: 'actions/setup-node@v3'
with:
node-version: '18.19.0'
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-python@v4
with:
python-version: '3.10'
Expand All @@ -261,17 +257,9 @@ jobs:
script: |
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
buildComplexEnvVars(core, context)
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.npm-cache/_prebuild
${{ github.workspace }}/.yarn-cache
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: setup-js
run: |
npm config set cache ${{ github.workspace }}/.npm-cache
yarn config set cache-folder ${{ github.workspace }}/.yarn-cache
make setup-js
# build the desktop app and deploy it
- name: 'build ${{matrix.variant}} app for ${{ matrix.os }}'
Expand All @@ -293,7 +281,7 @@ jobs:
OT_APP_DEPLOY_FOLDER: ${{ steps.project.outputs.folder }}

run: |
make -C app-shell dist-${{ matrix.os }}
make -C app-shell dist-${{ matrix.os }} USE_HARD_LINKS=false

- name: 'upload github artifact'
if: matrix.target == 'desktop'
Expand All @@ -314,8 +302,9 @@ jobs:
deploy-release-app:
name: 'Deploy built app artifacts to S3'
runs-on: 'ubuntu-22.04'
# TODO: readd unit test dependency after tests are converted to vitest
needs:
['js-unit-test', 'backend-unit-test', 'build-app', 'determine-build-type']
['build-app', 'determine-build-type']
if: contains(fromJSON(needs.determine-build-type.outputs.variants), 'release') || contains(fromJSON(needs.determine-build-type.outputs.variants), 'internal-release')
steps:
- name: 'download run app builds'
Expand Down Expand Up @@ -425,6 +414,9 @@ jobs:
cd ./monorepo
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
git checkout ${{ github.ref }}
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: 'actions/setup-node@v3'
with:
node-version: '18.19.0'
Expand All @@ -437,17 +429,9 @@ jobs:
script: |
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/monorepo/.github/workflows/utils.js`)
buildComplexEnvVars(core, context)
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.npm-cache/_prebuild
${{ github.workspace }}/.yarn-cache
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: 'setup-js'
run: |
npm config set cache ${{ github.workspace }}/.npm-cache
yarn config set cache-folder ${{ github.workspace }}/.yarn-cache
cd monorepo
make setup-js
- name: 'update internal-releases releases.json'
Expand Down
56 changes: 19 additions & 37 deletions .github/workflows/components-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ on:
- 'Makefile'
- 'components/**'
- 'app/**/*.stories.@(js|jsx|ts|tsx)'
- 'webpack-config/**'
- 'package.json'
- '.github/workflows/components-test-build-deploy.yaml'
push:
paths:
- 'components/**'
- 'app/**/*.stories.@(js|jsx|ts|tsx)'
- 'webpack-config/**'
- 'package.json'
- '.github/workflows/components-test-build-deploy.yaml'
branches:
Expand All @@ -42,24 +40,17 @@ jobs:
runs-on: 'ubuntu-22.04'
steps:
- uses: 'actions/checkout@v3'
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: 'actions/setup-node@v3'
with:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
run: 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: 'run components unit tests'
run: make -C components test-cov
Expand All @@ -73,27 +64,21 @@ jobs:
name: 'build components artifact'
runs-on: 'ubuntu-22.04'
if: github.event_name != 'pull_request'
needs: ['js-unit-test']
# TODO IMMEDIATELY: revert change below. doing this so i can test component builds without tests passing
#needs: ['js-unit-test']
steps:
- uses: 'actions/checkout@v3'
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: 'actions/setup-node@v3'
with:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
run: 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: 'build components'
run: make -C components
Expand Down Expand Up @@ -127,7 +112,8 @@ jobs:
name: 'deploy components storybook artifact to S3'
runs-on: 'ubuntu-22.04'
needs:
['js-unit-test', 'build-components-storybook', 'determine-build-type']
# TODO IMMEDIATELY: revert change below. doing this so i can test component builds without tests passing
['build-components-storybook', 'determine-build-type']
if: needs.determine-build-type.outputs.type != 'none'
steps:
- uses: 'actions/checkout@v3'
Expand All @@ -137,6 +123,9 @@ jobs:
run: |
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
git checkout ${{ github.ref }}
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: 'actions/setup-node@v3'
with:
node-version: '18.19.0'
Expand All @@ -163,7 +152,8 @@ jobs:
publish-components:
name: 'publish components package to npm'
runs-on: 'ubuntu-latest'
needs: ['js-unit-test', 'determine-build-type']
# TODO IMMEDIATELY: revert change below. doing this so i can test component builds without tests passing
needs: ['determine-build-type']
if: needs.determine-build-type.outputs.type == 'publish'
steps:
- uses: 'actions/checkout@v3'
Expand All @@ -173,25 +163,17 @@ jobs:
run: |
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
git checkout ${{ github.ref }}
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: 'actions/setup-node@v3'
with:
node-version: '18.19.0'
registry-url: 'https://registry.npmjs.org'
- 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
yarn config set network-timeout 60000
yarn
yarn config set cache-folder ./.yarn-cache
- name: 'build typescript'
run: make build-ts
- name: 'build library'
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/g-code-testing-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,9 @@ jobs:
- uses: './.github/actions/python/setup'
with:
project: 'g-code-testing'
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.npm-cache/_prebuild
${{ github.workspace }}/.yarn-cache
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: 'setup-js'
run: |
npm config set cache ${{ github.workspace }}/.npm-cache
yarn config set cache-folder ${{ github.workspace }}/.yarn-cache
make setup-js
- name: Lint
run: make -C g-code-testing lint
Expand Down
Loading
Loading