-
Notifications
You must be signed in to change notification settings - Fork 3
TINY-13545: Update libraries and allow test parallelisation #161
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
Closed
Closed
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
05bd054
Refactored our routes so the server can start as soon as the port has…
TheSpyder 444ceaa
Merge remote-tracking branch 'origin/spikes/portwait' into feature/TI…
jscasca 4049cd4
TINY-13545: Use scratch dir
jscasca d231110
TINY-13539: Update FC, Lerna, Wdio, and other libs
jscasca 44fe904
TINY-13539: Update eslint
jscasca 072f55e
Fix util import
jscasca 1ef94f0
TINY-13539: Revert glob
jscasca 28b6e35
TINY-13539: Update cmd line args and usage
jscasca 0525d96
Make client, runner, common ESM; Server CJS
jscasca f5c8e14
TINY-13539: Move server to ESM
jscasca 77891b3
Move back testing
jscasca a9cadd9
Debug port
jscasca 11b2106
More logging
jscasca 03c1884
Defer driver
jscasca 0a2d395
Remove unused
jscasca 2d4fd9b
TINY-13545: Update jenkinsfile, fix changelog
jscasca 2aaa8f7
Remove duplicate
jscasca File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,10 @@ | |
| standardProperties() | ||
|
|
||
| timestamps { | ||
| tinyPods.node( | ||
| tinyPods.nodeBrowser( | ||
| tag: '20', | ||
| resourceRequestMemory: '2Gi', | ||
| resourceLimitMemory: '2Gi' | ||
| resourceRequestMemory: '3Gi', | ||
| resourceLimitMemory: '3Gi', | ||
| ) { | ||
| stage("clean") { | ||
| exec('yarn clean') | ||
|
|
@@ -26,44 +26,35 @@ timestamps { | |
| stage("test") { | ||
| exec('yarn test') | ||
| } | ||
| } | ||
|
|
||
| // Testing | ||
| stage("bedrock testing") { | ||
| bedrockRemoteBrowsers( | ||
| testContainer: [ | ||
| resourceRequestMemory: '2Gi', | ||
| resourceLimitMemory: '2Gi', | ||
| ], | ||
| platforms: [ | ||
| [ browser: 'chrome', provider: 'aws', buckets: 2 ], | ||
| [ browser: 'firefox', provider: 'aws', buckets: 2 ], | ||
| [ browser: 'edge', provider: 'lambdatest', buckets: 1 ], | ||
| [ browser: 'chrome', provider: 'lambdatest', os: 'macOS Sonoma', buckets: 1 ], | ||
| [ browser: 'firefox', provider: 'lambdatest', os: 'macOS Sonoma', buckets: 1 ], | ||
| [ browser: 'safari', provider: 'lambdatest', os: 'macOS Sonoma', buckets: 1 ], | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is there no Safari anymore?
|
||
| ], | ||
| prepareTests: { | ||
| yarnInstall() | ||
| sh 'yarn build' | ||
| }, | ||
| def platforms = [ | ||
| [ browser: 'chrome', provider: 'lambdatest', os: 'macOS Sonoma', buckets: 1], | ||
| [ browser: 'edge', provider: 'lambdatest', buckets: 1], | ||
| [ browser: 'chrome', provider: 'aws', buckets: 2 ], | ||
| [ browser: 'firefox', provider: 'aws', buckets: 2 ], | ||
| [ browser: 'chrome', provider: 'headless' ] | ||
| ] | ||
|
|
||
| def cleanBranchName = (env.BRANCH_NAME ?: "").split('/').last() | ||
| def testPrefix = "Bedrock_${cleanBranchName}-b${env.BUILD_NUMBER}" | ||
|
|
||
| bedrockLocalBrowsers( | ||
| testDirs: [ 'modules/sample/src/test/ts/**/pass' ], | ||
| custom: '--config modules/sample/tsconfig.json --customRoutes modules/sample/routes.json' | ||
| custom: "--config modules/sample/tsconfig.json --customRoutes modules/sample/routes.json", | ||
| platforms: platforms, | ||
| prefix: testPrefix | ||
| ) | ||
| } | ||
|
|
||
| // Publish | ||
| if (isReleaseBranch()) { | ||
| stage("publish") { | ||
| tinyPods.node() { | ||
| yarnInstall() | ||
| sh 'yarn build' | ||
| if (isReleaseBranch()) { | ||
| echo "Publish?" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? |
||
| tinyNpm.withNpmPublishCredentials { | ||
| // We need to tell git to ignore the changes to .npmrc when publishing | ||
| exec('git update-index --assume-unchanged .npmrc') | ||
| // Re-evaluate whether we still need the `--no-verify-access` flag after upgrading Lerna (TINY-13539) | ||
| exec('yarn lerna publish from-package --yes --no-git-reset --ignore @ephox/bedrock-sample --no-verify-access') | ||
| exec('yarn lerna publish from-package --yes --no-git-reset --ignore @ephox/bedrock-sample') | ||
| } | ||
| } else { | ||
| echo "No release branch: nothing to publish" | ||
| } | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| // eslint.config.js | ||
| import path from "path"; | ||
| import { fileURLToPath } from "url"; | ||
| import { FlatCompat } from "@eslint/eslintrc"; | ||
| import tsParser from '@typescript-eslint/parser' | ||
| import tsPlugin from '@typescript-eslint/eslint-plugin' | ||
|
|
||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = path.dirname(__filename); | ||
|
|
||
| const compat = new FlatCompat({ | ||
| baseDirectory: __dirname | ||
| }) | ||
|
|
||
| // module.exports = [ | ||
| export default [ | ||
| ...compat.extends('plugin:@typescript-eslint/recommended'), | ||
| { | ||
| files: ['**/*.{ts,tsx,js,jsx}'], | ||
|
|
||
| languageOptions: { | ||
| parser: tsParser, | ||
| parserOptions: { | ||
| sourceType: 'module', | ||
| }, | ||
| }, | ||
|
||
|
|
||
| plugins: { | ||
| '@typescript-eslint': tsPlugin, | ||
| }, | ||
|
|
||
| // Equivalent of env: { browser: true } | ||
| languageOptions: { | ||
| parser: tsParser, | ||
| parserOptions: { | ||
| sourceType: 'module', | ||
| }, | ||
| globals: { | ||
| window: 'readonly', | ||
| document: 'readonly', | ||
| navigator: 'readonly', | ||
| console: 'readonly', | ||
| }, | ||
| }, | ||
|
|
||
| rules: { | ||
| // Typescript-eslint rules | ||
| '@typescript-eslint/no-explicit-any': 'off', | ||
| '@typescript-eslint/explicit-function-return-type': 'off', | ||
| '@typescript-eslint/no-unused-vars': [ | ||
| 'warn', | ||
| { | ||
| vars: 'all', | ||
| args: 'after-used', | ||
| ignoreRestSiblings: true, | ||
| argsIgnorePattern: '^_', | ||
| caughtErrors: 'all', | ||
| caughtErrorsIgnorePattern: '^_' | ||
| }, | ||
| ], | ||
| '@typescript-eslint/no-use-before-define': 'off', | ||
| '@typescript-eslint/explicit-module-boundary-types': [ | ||
| 'error', | ||
| { allowArgumentsExplicitlyTypedAsAny: true }, | ||
| ], | ||
|
|
||
| // Core stylistic rules | ||
| 'arrow-spacing': 'error', | ||
| 'no-multi-spaces': ['error', { ignoreEOLComments: true }], | ||
| 'no-multiple-empty-lines': ['error', { max: 1 }], | ||
| 'object-shorthand': 'error', | ||
| 'quotes': ['error', 'single', { allowTemplateLiterals: true }], | ||
| 'space-before-function-paren': [ | ||
| 'error', | ||
| { anonymous: 'always', named: 'never' }, | ||
| ], | ||
| 'semi': 'error', | ||
| 'spaced-comment': 'error', | ||
| 'space-infix-ops': 'error', | ||
| 'space-unary-ops': 'error', | ||
| 'space-before-blocks': 'error', | ||
| }, | ||
| }, | ||
| ]; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| { | ||
| "npmClient": "yarn", | ||
| "useWorkspaces": true, | ||
| "version": "15.1.1", | ||
| "publish": { | ||
| "push": false | ||
| } | ||
| "command": { | ||
| "publish": { | ||
| "verifyAccess": false | ||
| } | ||
| }, | ||
| "$schema": "node_modules/lerna/schemas/lerna-schema.json" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would've preferred this to be it's own PR, adding in codebase-wide chore tasks to a combined PR makes it harder to pick out the important things for a review. Also, the github UI has a limit on how many files can be expanded by default so it's much slower to review the important parts.