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

feat: execute all tests with lerna to test all packages #1646

Closed
wants to merge 1 commit into from

Conversation

lili2311
Copy link
Contributor

@lili2311 lili2311 commented Feb 18, 2021

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

Run commands that need to be run on all packages with Lerna, and use npm for the rest.
Lerna can execute all package tests found in the repo
https://github.com/lerna/lerna/tree/main/commands/run#readme

@lili2311 lili2311 requested review from a team as code owners February 18, 2021 10:21
@lili2311 lili2311 force-pushed the chore/run-tests-with-lerna branch 2 times, most recently from 1781ed0 to 58bf4b9 Compare February 18, 2021 10:27
@lili2311 lili2311 self-assigned this Feb 18, 2021
@lili2311 lili2311 force-pushed the chore/run-tests-with-lerna branch 2 times, most recently from 5be46dc to 80b0149 Compare February 19, 2021 10:01
@lili2311 lili2311 requested a review from JackuB February 19, 2021 10:02
@@ -227,7 +230,7 @@ jobs:
command: echo "//registry.npmjs.org/:_authToken=$env:NPM_TOKEN" >> .npmrc
- run:
name: Install dependencies (Windows)
command: npm install --ignore-scripts # ignore-scripts required because of postinstall script in snyk-resolve-deps package
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no longer needed as snyk-resolve-deps postinstall was migrated to prepare

@lili2311 lili2311 force-pushed the chore/run-tests-with-lerna branch 6 times, most recently from a643dc5 to 249f5be Compare February 19, 2021 16:00
@lili2311
Copy link
Contributor Author

@JackuB please 👀

@lili2311 lili2311 force-pushed the chore/run-tests-with-lerna branch 2 times, most recently from 565bf8c to 2a2cf08 Compare February 22, 2021 10:20
@lili2311 lili2311 closed this Feb 22, 2021
@lili2311 lili2311 reopened this Feb 22, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Feb 22, 2021

Expected release notes (by @lili2311)

features:
execute all tests with lerna to test all packages (e7d7a34)

others (will not be included in Semantic-Release notes):
improve iac test error messages & remove irrelevant tests (9036298)

  • I hereby acknowledge these release notes are 🥙 AWESOME 🥙

@@ -128,7 +128,7 @@ describe('Analytics basic testing', () => {
'integrationEnvironmentVersion',
].sort(),
);
});
}, 10000);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these were super flaky and not completing in a default given time

@@ -241,25 +247,25 @@ jobs:
steps:
- run:
name: Run "Root" tap tests
command: npm run test:test
command: lerna run test:test --stream
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is the plan that each package will have a task called test:test and test:jest? I think it's just a limitation of the current CLI that we have tests split like this.

How about removing the test script from the root package.json (as we can't/don't use it now) and just have a lerna run test that will test packages? We might even have a single container dedicated for that now

@lili2311 lili2311 closed this Feb 23, 2021
@darscan darscan deleted the chore/run-tests-with-lerna branch January 20, 2023 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants