Skip to content

Commit

Permalink
ChromeDriver cannot search when using ncc
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess committed May 16, 2024
1 parent ad87db7 commit 23d5a63
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ jobs:
- run: yarn test
- run: |
node_modules/.bin/tsc $GITHUB_WORKSPACE/__tests__/chromedriver.ts
node_modules/.bin/ncc build $GITHUB_WORKSPACE/__tests__/chromedriver.js -o $GITHUB_WORKSPACE/__tests__
rm -rf node_modules
# Cannot find chromedriver when using ncc.
# see https://github.com/nanasess/setup-chromedriver/issues/303
# node_modules/.bin/ncc build $GITHUB_WORKSPACE/__tests__/chromedriver.js -o $GITHUB_WORKSPACE/__tests__
# rm -rf node_modules
- if: matrix.chrome_version != 'current'
env:
CHROME_VERSION: ${{ matrix.chrome_version }}
Expand Down Expand Up @@ -72,7 +74,7 @@ jobs:
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # disable headless mode
node $GITHUB_WORKSPACE/__tests__/index.js
node $GITHUB_WORKSPACE/__tests__/chromedriver.js
test_default_version:
runs-on: ${{ matrix.os }}
Expand All @@ -95,8 +97,10 @@ jobs:
- run: yarn test
- run: |
node_modules/.bin/tsc $GITHUB_WORKSPACE/__tests__/chromedriver.ts
node_modules/.bin/ncc build $GITHUB_WORKSPACE/__tests__/chromedriver.js -o $GITHUB_WORKSPACE/__tests__
rm -rf node_modules
# Cannot find chromedriver when using ncc.
# see https://github.com/nanasess/setup-chromedriver/issues/303
# node_modules/.bin/ncc build $GITHUB_WORKSPACE/__tests__/chromedriver.js -o $GITHUB_WORKSPACE/__tests__
# rm -rf node_modules
- uses: ./
if: matrix.branch == 'now'
- uses: nanasess/setup-chromedriver@master
Expand All @@ -107,4 +111,4 @@ jobs:
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # disable headless mode
node $GITHUB_WORKSPACE/__tests__/index.js
node $GITHUB_WORKSPACE/__tests__/chromedriver.js
16 changes: 10 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ jobs:
- run: yarn test
- run: |
node_modules/.bin/tsc $GITHUB_WORKSPACE/__tests__/chromedriver.ts
node_modules/.bin/ncc build $GITHUB_WORKSPACE/__tests__/chromedriver.js -o $GITHUB_WORKSPACE/__tests__
rm -rf node_modules
# Cannot find chromedriver when using ncc.
# see https://github.com/nanasess/setup-chromedriver/issues/303
# node_modules/.bin/ncc build $GITHUB_WORKSPACE/__tests__/chromedriver.js -o $GITHUB_WORKSPACE/__tests__
# rm -rf node_modules
shell: bash
- shell: pwsh
run: |
Expand All @@ -63,7 +65,7 @@ jobs:
- name: setup
run: |
chromedriver --url-base=/wd/hub &
node "$Env:GITHUB_WORKSPACE\__tests__\index.js"
node "$Env:GITHUB_WORKSPACE\__tests__\chromedriver.js"
test_default_version:
runs-on: ${{ matrix.os }}
Expand All @@ -84,8 +86,10 @@ jobs:
- run: yarn test
- run: |
node_modules/.bin/tsc $GITHUB_WORKSPACE/__tests__/chromedriver.ts
node_modules/.bin/ncc build $GITHUB_WORKSPACE/__tests__/chromedriver.js -o $GITHUB_WORKSPACE/__tests__
rm -rf node_modules
# Cannot find chromedriver when using ncc.
# see https://github.com/nanasess/setup-chromedriver/issues/303
# node_modules/.bin/ncc build $GITHUB_WORKSPACE/__tests__/chromedriver.js -o $GITHUB_WORKSPACE/__tests__
# rm -rf node_modules
shell: bash
- uses: ./
if: matrix.branch == 'now'
Expand All @@ -94,4 +98,4 @@ jobs:
- name: setup
run: |
chromedriver --url-base=/wd/hub &
node "$Env:GITHUB_WORKSPACE\__tests__\index.js"
node "$Env:GITHUB_WORKSPACE\__tests__\chromedriver.js"

0 comments on commit 23d5a63

Please sign in to comment.