Skip to content

Commit

Permalink
Use ts-node
Browse files Browse the repository at this point in the history
Fix error TS1192: Module '"/Users/runner/work/setup-chromedriver/setup-chromedriver/node_modules/@types/selenium-webdriver/http"' has no default export.
  • Loading branch information
nanasess committed Jun 23, 2024
1 parent 4d417fd commit d6dce55
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ jobs:
- run: yarn build
- run: yarn package
- run: yarn test
- run: |
node_modules/.bin/tsc $GITHUB_WORKSPACE/__tests__/chromedriver.ts
# 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
# - run: |
# node_modules/.bin/tsc $GITHUB_WORKSPACE/__tests__/chromedriver.ts
# # 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 @@ -82,7 +82,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__/chromedriver.js
node_modules/.bin/ts-node $GITHUB_WORKSPACE/__tests__/chromedriver.ts
test_default_version:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -111,11 +111,11 @@ jobs:
- run: yarn build
- run: yarn package
- run: yarn test
- run: |
node_modules/.bin/tsc $GITHUB_WORKSPACE/__tests__/chromedriver.ts
# 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__
# - run: |
# node_modules/.bin/tsc $GITHUB_WORKSPACE/__tests__/chromedriver.ts
# # 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'
Expand All @@ -127,4 +127,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__/chromedriver.js
node_modules/.bin/ts-node $GITHUB_WORKSPACE/__tests__/chromedriver.ts
32 changes: 16 additions & 16 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
- run: yarn build
- run: yarn package
- run: yarn test
- run: |
node_modules/.bin/tsc $GITHUB_WORKSPACE/__tests__/chromedriver.ts
# 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
# - run: |
# node_modules/.bin/tsc $GITHUB_WORKSPACE/__tests__/chromedriver.ts
# # 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: |
$chrome_fullversion = (Get-Item $Env:CHROMEAPP).VersionInfo.FileVersion
Expand All @@ -65,7 +65,7 @@ jobs:
- name: setup
run: |
chromedriver --url-base=/wd/hub &
node "$Env:GITHUB_WORKSPACE\__tests__\chromedriver.js"
node_modules\.bin\ts-node "$Env:GITHUB_WORKSPACE\__tests__\chromedriver.ts"
test_default_version:
runs-on: ${{ matrix.os }}
Expand All @@ -84,18 +84,18 @@ jobs:
- run: yarn build
- run: yarn package
- run: yarn test
- run: |
node_modules/.bin/tsc $GITHUB_WORKSPACE/__tests__/chromedriver.ts
# 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
# - run: |
# node_modules/.bin/tsc $GITHUB_WORKSPACE/__tests__/chromedriver.ts
# # 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'
- uses: nanasess/setup-chromedriver@master
if: matrix.branch == 'master'
- name: setup
run: |
chromedriver --url-base=/wd/hub &
node "$Env:GITHUB_WORKSPACE\__tests__\chromedriver.js"
node_modules\.bin\ts-node "$Env:GITHUB_WORKSPACE\__tests__\chromedriver.ts"

0 comments on commit d6dce55

Please sign in to comment.