Skip to content

Commit

Permalink
chore(ci): Break up e2e tests (#6169)
Browse files Browse the repository at this point in the history
This commit moves test definitions around and doesn't meaningfully
change them. The main change worth noting is that the `basicPrune`
and `explicitDepPrune` pipeline fixtures were running all 8 tests
with yarn. After this change they are only running the relevant prune
tests (both from a root directory and when the monorepo is nested
in a subdirectory). The extra tests are removed, because the changed
pipeline definition does not meaningfully test anything different in 
turbo run commands.
  • Loading branch information
mehulkar committed Oct 13, 2023
1 parent 2b7ca78 commit 5cae760
Show file tree
Hide file tree
Showing 16 changed files with 1,227 additions and 986 deletions.
75 changes: 47 additions & 28 deletions pnpm-lock.yaml

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

63 changes: 63 additions & 0 deletions turborepo-tests/e2e/fixtures.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
export const basicPipeline = {
pipeline: {
test: {
dependsOn: ["^build"],
outputs: [],
},
lint: {
inputs: ["build.js", "lint.js"],
outputs: [],
},
build: {
dependsOn: ["^build"],
outputs: ["dist/**", "!dist/cache/**"],
},
"//#build": {
dependsOn: [],
outputs: ["dist/**"],
inputs: ["rootbuild.js"],
},
"//#special": {
dependsOn: ["^build"],
outputs: ["dist/**"],
inputs: [],
},
"//#args": {
dependsOn: [],
outputs: [],
},
},
globalEnv: ["GLOBAL_ENV_DEPENDENCY"],
};

export const prunePipeline = {
...basicPipeline,
pipeline: {
...basicPipeline.pipeline,
// add some package specific pipeline tasks to test pruning
"a#build": {
outputs: ["dist/**", "!dist/cache/**"],
},
"c#build": {
outputs: ["dist/**", "!dist/cache/**"],
},
},
};

export const explicitPrunePipeline = {
...basicPipeline,
pipeline: {
...basicPipeline.pipeline,
// add some package specific pipeline tasks to test pruning
"a#build": {
dependsOn: ["b#build"],
outputs: ["dist/**", "!dist/cache/**"],
},
"b#build": {
outputs: ["dist/**", "!dist/cache/**"],
},
"c#build": {
outputs: ["dist/**", "!dist/cache/**"],
},
},
};
Loading

1 comment on commit 5cae760

@vercel
Copy link

@vercel vercel bot commented on 5cae760 Oct 13, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.