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

ci: install firefox to run dev server #7852

Closed
15 changes: 11 additions & 4 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,19 @@ jobs:
with:
node-version: ${{ matrix.node }}

- name: Setup chrome
if: matrix.os != 'windows-latest'
uses: browser-actions/setup-chrome@v1
with:
chrome-version: "122.0.6261.128"
install-dependencies: true

### x86_64-unknown-linux-gnu

- name: Test x86_64-unknown-linux-gnu
timeout-minutes: 15 # Tests should finish within 15 mins, please fix your tests instead of changing this to a higher timeout.
if: ${{ inputs.target == 'x86_64-unknown-linux-gnu' && !inputs.skipable }}
run: pnpm run test:ci
run: pnpm run test:server

### TODO: diff cases with new runners
# - name: Test diff test
Expand All @@ -318,19 +325,19 @@ jobs:
run: |
# arch is ARM and target is ARM
if [[ '${{ runner.arch }}' == ARM* && '${{ inputs.target }}' == 'aarch64-apple-darwin' ]]; then
pnpm run test:ci
pnpm run test:server
fi
# arch is x64 and target is x64
if [[ '${{ runner.arch }}' != ARM* && '${{ inputs.target }}' != 'aarch64-apple-darwin' ]]; then
pnpm run test:ci
pnpm run test:server
fi

### x86_64-pc-windows-msvc

- name: Test x86_64-pc-windows-msvc
timeout-minutes: 20 # Tests should finish within 15 mins, please fix your tests instead of changing this to a higher timeout.
if: ${{ inputs.target == 'x86_64-pc-windows-msvc' && !inputs.skipable }}
run: pnpm run test:ci
run: pnpm run test:server

- name: API change check
if: ${{ inputs.target == 'x86_64-unknown-linux-gnu' && !inputs.skipable }}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"test:unit": "pnpm --filter \"@rspack/*\" test",
"test:e2e": "pnpm --filter \"@rspack-e2e/*\" test",
"test:ci": "cross-env NODE_OPTIONS=--max_old_space_size=8192 pnpm run build:js && pnpm run test:unit && npm run test:plugin && pnpm test:webpack",
"test:server": "cross-env NODE_OPTIONS=--max_old_space_size=8192 pnpm run build:js && pnpm --filter \"@rspack/dev-server\" test",
"test:plugin": "pnpm --filter \"plugin-test\" test",
"test:webpack": "pnpm --filter \"webpack-test\" test:metric",
"doc-coverage": "pnpm --filter '@rspack/core' doc-coverage",
Expand Down
2 changes: 1 addition & 1 deletion packages/rspack-dev-server/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const config = {
},
testMatch: [
"<rootDir>/tests/*.test.ts",
...(isWin || process.env.CI ? [] : ["<rootDir>/tests/e2e/*.test.js"])
...(isWin ? [] : ["<rootDir>/tests/e2e/bonjour.test.js"])
],
testPathIgnorePatterns:
isWin || process.env.CI
Expand Down
5 changes: 3 additions & 2 deletions packages/rspack-dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"scripts": {
"build": "tsc -b ./tsconfig.build.json",
"dev": "tsc -w -b ./tsconfig.build.json",
"test": "rimraf .test-temp && cross-env NO_COLOR=1 node --expose-gc --max-old-space-size=8192 --experimental-vm-modules ../../node_modules/jest-cli/bin/jest --colors",
"test:install": "./node_modules/.bin/puppeteer browsers install chrome",
"test": "pnpm test:install && rimraf .test-temp && cross-env NO_COLOR=1 node --expose-gc --max-old-space-size=8192 --experimental-vm-modules ../../node_modules/jest-cli/bin/jest --ci --colors",
"api-extractor": "api-extractor run --verbose",
"api-extractor:ci": "api-extractor run --verbose || diff temp/api.md etc/api.md"
},
Expand All @@ -46,7 +47,7 @@
"graceful-fs": "4.2.10",
"http-proxy": "^1.18.1",
"jest-serializer-path": "^0.1.15",
"puppeteer": "^23.2.2",
"puppeteer": "22.5.0",
"sockjs-client": "^1.6.1",
"supertest": "^6.1.3",
"tcp-port-used": "^1.0.2",
Expand Down
Loading
Loading