From 23d5a6372f9596332ca5fc06e40eefd556588a1d Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Thu, 16 May 2024 18:31:31 +0900 Subject: [PATCH] ChromeDriver cannot search when using ncc --- .github/workflows/test.yml | 16 ++++++++++------ .github/workflows/windows.yml | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 07babda2..f349b87c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }} @@ -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 }} @@ -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 @@ -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 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index fc3ca8da..43b3ec27 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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: | @@ -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 }} @@ -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' @@ -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"