Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playwright failing in CI #68

Open
shiftyp opened this issue Sep 18, 2023 · 2 comments
Open

Playwright failing in CI #68

shiftyp opened this issue Sep 18, 2023 · 2 comments
Labels

Comments

@shiftyp
Copy link
Owner

shiftyp commented Sep 18, 2023

Takes forever, fails all tests that run, unsure of the issue as my setup is almost identical to the upstream repo. Guideposts:

name: tests
on:
push:
branches: main
jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- run: yarn install
- run: yarn build
- run: yarn run playwright install --with-deps
- name: Unit Test
run: yarn test:unit
chrome:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- run: yarn install
- run: yarn build
- run: yarn run playwright install --with-deps
- name: Set Chrome Version
run: |
CHROMEVER="$(chromedriver --version | cut -d' ' -f2)"
echo "Actions ChromeDriver is $CHROMEVER"
echo "CHROMEVER=${CHROMEVER}" >> $GITHUB_ENV
- name: Chrome Test
run: yarn test:browser --project=chrome
firefox:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- run: yarn install
- run: yarn build
- run: yarn run playwright install --with-deps
- name: Firefox Test
run: yarn test:browser --project=firefox

ts-turbo/package.json

Lines 62 to 74 in 4d123cc

"scripts": {
"clean": "rm -fr dist",
"clean:win": "rmdir /s /q dist",
"typecheck": "tsc --noEmit false --declaration true --emitDeclarationOnly true --outDir dist/types",
"build": "rollup -c",
"watch": "rollup -wc",
"start": "node src/tests/server.mjs",
"test": "yarn test:unit && yarn test:browser",
"test:browser": "playwright test",
"test:unit": "NODE_OPTIONS=--inspect web-test-runner",
"test:unit:win": "SET NODE_OPTIONS=--inspect & web-test-runner",
"release": "yarn build && npm publish",
"lint": "eslint ./src --ext .ts"

import { devices } from "@playwright/test"
const config = {
projects: [
{
name: "chrome",
use: {
...devices["Desktop Chrome"],
contextOptions: {
timeout: 60000
}
}
},
{
name: "firefox",
use: {
...devices["Desktop Firefox"],
contextOptions: {
timeout: 60000
}
}
}
],
browserStartTimeout: 60000,
retries: 2,
testDir: "./src/tests/",
testMatch: /(functional|integration)\/.*_tests\.js/,
webServer: {
command: "yarn start",
url: "http://localhost:9000/src/tests/fixtures/test.js",
timeout: 120 * 1000,
// eslint-disable-next-line no-undef
reuseExistingServer: !process.env.CI
},
use: {
baseURL: "http://localhost:9000/"
}
}
export default config

import resolve from "@rollup/plugin-node-resolve"
import typescript from "@rollup/plugin-typescript"
import { version } from "./package.json"
const year = new Date().getFullYear()
const banner = `/*!\nTurbo ${version}\nCopyright © ${year} 37signals LLC\n */`
export default [
{
input: "src/index.ts",
output: [
{
name: "Turbo",
file: "dist/turbo.es2017-umd.js",
format: "umd",
banner
},
{
file: "dist/turbo.es2017-esm.js",
format: "es",
banner
}
],
plugins: [
resolve(),
typescript()
],
watch: {
include: "src/**"
}
}
]

@shiftyp shiftyp added the Internal Issue issue label Sep 18, 2023
@shiftyp
Copy link
Owner Author

shiftyp commented Sep 22, 2023

Perhaps you have some ideas @afcapel? I have a CI environment variable set in GitHub. Maybe I'm missing something else in the environment?

@shiftyp
Copy link
Owner Author

shiftyp commented Sep 22, 2023

I've tried running in Node 16 as well with the same effect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant