Skip to content

Commit

Permalink
fix the side runner ci part
Browse files Browse the repository at this point in the history
  • Loading branch information
toddtarsi committed Dec 23, 2023
1 parent f0302de commit 600bdde
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Test Side Runner'
name: 'Test Selenium IDE'

on:
pull_request:
Expand All @@ -23,15 +23,16 @@ jobs:
if: github.repository == 'seleniumhq/selenium-ide'
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.11.0
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Install pnpm
run: npm i -g pnpm
cache: 'pnpm'
- name: Install dependencies
run: pnpm -r i
- name: Build side-runner and selenium-ide
run: pnpm run build
- name: Run all tests
run: npm run test
run: pnpm run test
10 changes: 10 additions & 0 deletions packages/side-runner/runner.jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/** eslint-disable **/
const path = require('path')

module.exports = {
reporters: ['default'],
rootDir: path.resolve(__dirname),
testEnvironment: 'node',
testPathIgnorePatterns: ['<rootDir>/node_modules/'],
verbose: true,
}
5 changes: 3 additions & 2 deletions packages/side-runner/src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ configuration.debugStartup &&
// All the stuff that goes into a big wrapped jest command
const jest = 'node ' + resolveBin.sync('jest')
const jestArgs = [
'--config=' + path.join(__dirname, '..', 'jest.config.js'),
'--config=' + path.join(__dirname, '..', 'runner.jest.config.js'),
'--maxConcurrency=' + configuration.maxWorkers,
]
.concat(
Expand All @@ -204,7 +204,7 @@ const jestArgs = [
]
: []
)
.concat(options.jestOptions.slice(1, -1).split(' '))
.concat(options.jestOptions.slice(1, -1).split(' ').filter(Boolean))
.concat(['--runTestsByPath', path.join(__dirname, 'main.test.js')])

const jestEnv = {
Expand All @@ -215,6 +215,7 @@ const jestEnv = {
configuration.debugStartup &&
console.debug('Jest command:', jest, jestArgs, jestEnv)
spawn(jest, jestArgs, {
cwd: process.cwd(),
env: jestEnv,
shell: true,
stdio: 'inherit',
Expand Down

0 comments on commit 600bdde

Please sign in to comment.