Fix cli v3 e2e suite issues (#1207)

* Fix resolve-legacy-peer-deps when PM=pnpm

* Fix setup/teardown

* Fix skip test before installing dependencies

* Re-enable e2e suite in CI

* Add changeset
This commit is contained in:
Émile Ré
2024-07-22 19:53:45 +04:00
committed by GitHub
parent 6293290fb9
commit 6e65591e87
5 changed files with 20 additions and 23 deletions
+5
View File
@@ -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'
+5 -5
View File
@@ -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]
@@ -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
@@ -1,7 +1,7 @@
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
autoInstallPeers: false
excludeLinksFromLockfile: false
importers:
@@ -11,9 +11,6 @@ importers:
'@trigger.dev/sdk':
specifier: 3.0.0-beta.40
version: 3.0.0-beta.40
lodash:
specifier: 4.17.21
version: 4.17.21
packages:
@@ -900,10 +897,6 @@ packages:
resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
dev: false
/lodash@4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
dev: false
/long@5.2.3:
resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==}
dev: false
+6 -10
View File
@@ -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 });
@@ -67,6 +67,10 @@ if (testCases.length > 0) {
}
}
if (options.packageManager && !existsSync(resolve(dir, LOCKFILES[options.packageManager]))) {
skip();
}
await installFixtureDeps(dir, packageManager);
}, TIMEOUT);
@@ -100,7 +104,6 @@ if (testCases.length > 0) {
dir,
packageManager,
resolveEnv,
skip,
skipTypecheck,
tempDir,
wantCompilationError,
@@ -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 () => {