ci: run e2e smoke against deployed app and ignore playwright artifacts
- Add e2e job (needs deploy, main/master only) that installs the Playwright browser and smoke-tests the live container on :3002 - Keep deploy-job contract slice from bleeding into the e2e job - Cover the e2e job in the CI workflow contract test - Ignore Playwright output dirs (test-results, playwright-report, blob-report)
This commit is contained in:
1 parent
399c047515
commit
4007b01da9
4 files changed
+45
-1
No files matched your search
@@ -57,4 +57,11 @@ describe("CI workflow", () => {
|
||||
it("has tag trigger", () => {
|
||||
expect(workflow).toContain('tags: ["v*"]');
|
||||
});
|
||||
|
||||
it("has e2e job that smoke-tests the deployed app", () => {
|
||||
expect(workflow).toContain("e2e:");
|
||||
expect(workflow).toContain("needs: deploy");
|
||||
expect(workflow).toContain("pnpm test:e2e");
|
||||
expect(workflow).toContain("PLAYWRIGHT_BASE_URL");
|
||||
});
|
||||
});
|
||||
@@ -7,7 +7,11 @@ const workflow = readFileSync(
|
||||
"utf8",
|
||||
);
|
||||
const deployStart = workflow.indexOf("\n deploy:");
|
||||
const deployJob = deployStart > -1 ? workflow.slice(deployStart) : "";
|
||||
const e2eStart = workflow.indexOf("\n e2e:");
|
||||
const deployJob =
|
||||
deployStart > -1
|
||||
? workflow.slice(deployStart, e2eStart > deployStart ? e2eStart : undefined)
|
||||
: "";
|
||||
|
||||
describe("deploy job", () => {
|
||||
it("runs on self-hosted for Docker access", () => {
|
||||
|
||||
Reference in new issue
Block a user