Skip to content

Fix cli v3 e2e suite issues #1207

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

Merged
merged 5 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/young-jars-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---

Fix various e2e issues for 'resolve-legacy-peer-deps' fixture, installation of fixture deps and lockfile-based test skipping'
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ jobs:
uses: ./.github/workflows/unit-tests.yml
secrets: inherit

# e2e:
# uses: ./.github/workflows/e2e.yml
# with:
# package: cli-v3
# secrets: inherit
e2e:
uses: ./.github/workflows/e2e.yml
with:
package: cli-v3
secrets: inherit

publish:
needs: [typecheck, units]
Expand Down
3 changes: 3 additions & 0 deletions packages/cli-v3/e2e/fixtures/resolve-legacy-peer-deps/.npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Configure npm to ignore peer deps upon install
legacy-peer-deps=true
# Configure pnpm to ignore peer deps upon install
auto-install-peers=false

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 6 additions & 10 deletions packages/cli-v3/e2e/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ logger.loggerLevel = options.logLevel;

if (testCases.length > 0) {
describe.concurrent("bundling", async () => {
beforeEach<E2EFixtureTest>(async ({ dir, packageManager }) => {
await rimraf(join(dir, "**/node_modules"), {
beforeEach<E2EFixtureTest>(async ({ dir, packageManager, skip }) => {
await rimraf(join(dir, "**/node_modules/**"), {
glob: true,
});
await rimraf(join(dir, ".yarn"), { glob: true });
Expand All @@ -67,6 +67,10 @@ if (testCases.length > 0) {
}
}

if (options.packageManager && !existsSync(resolve(dir, LOCKFILES[options.packageManager]))) {
skip();
}

await installFixtureDeps(dir, packageManager);
}, TIMEOUT);

Expand Down Expand Up @@ -100,7 +104,6 @@ if (testCases.length > 0) {
dir,
packageManager,
resolveEnv,
skip,
skipTypecheck,
tempDir,
wantCompilationError,
Expand All @@ -110,13 +113,6 @@ if (testCases.length > 0) {
wantInstallationError,
wantWorkerError,
}) => {
if (
options.packageManager &&
!existsSync(resolve(dir, LOCKFILES[options.packageManager]))
) {
skip();
}

let resolvedConfig: ReadConfigResult;
const configExpect = expect(
(async () => {
Expand Down
Loading