Skip to content

Commit

Permalink
update project config
Browse files Browse the repository at this point in the history
  • Loading branch information
Konboi committed Jan 31, 2024
1 parent 3c4e455 commit f033f8e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 444 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/playwright.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ jobs:
- name: Record commits and build
run: 'launchable record build --name "$GITHUB_RUN_ID" --source ..' # care for working-directory path
- name: Subset
# playwright junit reporter doesn't include testDir path of the config file. So in this case, trim testDir path ourselves.
run: find ./tests/*.ts | sed -e 's/.\/tests\///' | launchable subset --confidence 80% --flavor browser=${{ matrix.browser }} playwright > launchable-subset.txt
run: find tests/*.ts | launchable subset --confidence 80% --flavor browser=${{ matrix.browser }} playwright > launchable-subset.txt
- name: Run Playwright tests
run: npx playwright test --project=${{ matrix.browser }} ./tests/$(cat launchable-subset.txt) --reporter=junit > report.xml
run: npm run test --project=${{ matrix.browser }} $(cat launchable-subset.txt)
- name: Record
run: launchable record tests playwright report.xml
if: always()
2 changes: 1 addition & 1 deletion go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $ go test -list . ./... | \
--build ${BUILD_NAME} \
--confidence ${CONFIDENCE} \
go-test > launchable-subset.txt

Your model is currently in training
Launchable created subset 6 for build test (test session 6) in workspace launchableinc/example

Expand Down
4 changes: 3 additions & 1 deletion playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {},
"scripts": {
"test": "playwright test"
},
"keywords": [],
"author": "",
"license": "ISC",
Expand Down
4 changes: 2 additions & 2 deletions playwright/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { defineConfig, devices } from '@playwright/test';
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './tests',
testDir: '.',
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
Expand All @@ -20,7 +20,7 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
reporter: [['junit', { outputFile: 'report.xml' }]],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
Expand Down
Loading

0 comments on commit f033f8e

Please sign in to comment.