Skip to content

Commit

Permalink
ci: Added some more configuration to hopefully be more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
cskiwi committed Jan 18, 2024
1 parent 207340e commit 1f59515
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ assembly.html

.obsidian/workspace.json
files/
.nx/cache
.nx/cache
playwright-report/
13 changes: 7 additions & 6 deletions apps/badman-e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,24 @@ export default defineConfig({
/* Retry on CI only */
retries: process.env.CI ? 2 : 2,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : 1,
/* Timeout for each test */
// timeout: 120_000,
workers: process.env.CI ? 1 : '20%',
/* Timeout for each test, on average our test takes 3 seconds, so 10 should be plenty */
timeout: 60_000,
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
baseURL,
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
video: 'on-first-retry',
video: process.env.CI ? 'off' : 'on-first-retry',
},
reporter: [['html'], [process.env.CI ? 'github' : 'list']],
/* We build our client and then it's hosted via the api */
/* We build our projects and then api hosts itself and the client */
webServer: {
command: 'npx nx build badman && npx nx serve api',
command: 'npx nx run-many -t build -p badman,api && node dist/apps/api/main.js',
url: `${baseURL}/api/health`,
reuseExistingServer: !process.env.CI,
cwd: workspaceRoot,
// Our build + serve takes a while, so we need to increase the timeout.
timeout: 120_000,
stdout: 'pipe',
// stderr: 'pipe',
Expand Down
2 changes: 1 addition & 1 deletion apps/badman-e2e/src/tests/assembly.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bTest.describe('Landing page', () => {

bTest('Select encounter', async ({ assemblyPage }) => {
await expect(assemblyPage.encounterSelect).toContainText('against BC Tandpasta 1G');
await expect(assemblyPage.playerList).toBeVisible({ timeout: 60_000 });
await expect(assemblyPage.playerList).toBeVisible();
});

bTest('Player 8888 should be visible', async ({ assemblyPage }) => {
Expand Down

0 comments on commit 1f59515

Please sign in to comment.