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

Merged from master to v2 #370

Merged
merged 89 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
6d76892
Bump undici from 5.26.3 to 5.28.3
dependabot[bot] Feb 16, 2024
5100cd2
Bump husky from 9.0.10 to 9.0.11
dependabot[bot] Feb 19, 2024
2c2af09
Merge pull request #282 from nanasess/dependabot/npm_and_yarn/undici-…
nanasess Mar 21, 2024
0b63d0f
Merge pull request #285 from nanasess/dependabot/npm_and_yarn/husky-9…
nanasess Mar 26, 2024
aaf4b5a
Bump @types/semver from 7.5.6 to 7.5.8
dependabot[bot] Mar 26, 2024
aa52123
Bump undici from 5.28.3 to 5.28.4
dependabot[bot] Apr 4, 2024
33004c9
Merge pull request #288 from nanasess/dependabot/npm_and_yarn/types/s…
nanasess Apr 7, 2024
21ee497
Bump semver from 6.3.0 to 7.6.0
dependabot[bot] Apr 7, 2024
a176c30
Merge pull request #296 from nanasess/dependabot/npm_and_yarn/semver-…
nanasess Apr 14, 2024
6698eda
Bump selenium-webdriver and @types/selenium-webdriver
dependabot[bot] Apr 29, 2024
25b9467
Bump @types/node from 20.11.16 to 20.12.10
dependabot[bot] May 6, 2024
b1436b3
Merge pull request #300 from nanasess/dependabot/npm_and_yarn/types/n…
nanasess May 7, 2024
008e9c6
Merge pull request #295 from nanasess/dependabot/npm_and_yarn/undici-…
nanasess May 7, 2024
95e5e88
Merge branch 'master' into dependabot/npm_and_yarn/multi-17a089cf65
nanasess May 7, 2024
7aadeeb
Bump @types/node from 20.12.10 to 20.12.11
dependabot[bot] May 13, 2024
e791f2f
Merge pull request #301 from nanasess/dependabot/npm_and_yarn/types/n…
nanasess May 14, 2024
495d3b2
Merge branch 'master' into dependabot/npm_and_yarn/multi-17a089cf65
nanasess May 14, 2024
713728d
Bump semver from 7.6.0 to 7.6.2
dependabot[bot] May 14, 2024
c9585d1
Merge pull request #302 from nanasess/dependabot/npm_and_yarn/semver-…
nanasess May 16, 2024
ad87db7
Merge remote-tracking branch 'origin/master' into dependabot/npm_and_…
nanasess May 16, 2024
23d5a63
ChromeDriver cannot search when using ncc
nanasess May 16, 2024
4f641f8
Merge pull request #299 from nanasess/dependabot/npm_and_yarn/multi-1…
nanasess May 16, 2024
575d694
Bump os versions
nanasess May 17, 2024
1f484c9
Merge pull request #304 from nanasess/bump-runner
nanasess May 17, 2024
d4545e7
Fix README.md
nanasess May 18, 2024
85388ed
Merge pull request #305 from nanasess/bump-runner
nanasess May 18, 2024
0e33f41
---
dependabot[bot] May 20, 2024
5bcf697
Bump typed-rest-client from 1.8.11 to 2.0.0
dependabot[bot] Jun 10, 2024
5028fba
Bump braces from 3.0.2 to 3.0.3
dependabot[bot] Jun 16, 2024
38463b4
Merge pull request #314 from nanasess/dependabot/npm_and_yarn/braces-…
nanasess Jun 17, 2024
d05f9da
Merge pull request #306 from nanasess/dependabot/npm_and_yarn/seleniu…
nanasess Jun 17, 2024
5c89f38
Bump prettier from 3.2.5 to 3.3.2
dependabot[bot] Jun 17, 2024
f4fbf06
Merge pull request #310 from nanasess/dependabot/npm_and_yarn/typed-r…
nanasess Jun 17, 2024
c9460e8
Bump @types/node from 20.12.11 to 20.14.4
dependabot[bot] Jun 17, 2024
6b09958
Merge pull request #316 from nanasess/dependabot/npm_and_yarn/types/n…
nanasess Jun 20, 2024
4d417fd
Bump @types/selenium-webdriver from 4.1.22 to 4.1.23
dependabot[bot] Jun 20, 2024
d6dce55
Use ts-node
nanasess Jun 23, 2024
dc8b512
Merge pull request #317 from nanasess/dependabot/npm_and_yarn/types/s…
nanasess Jun 23, 2024
d4e4993
Merge pull request #315 from nanasess/dependabot/npm_and_yarn/prettie…
nanasess Jun 23, 2024
ed01dc7
Bump typed-rest-client from 2.0.0 to 2.0.2
dependabot[bot] Jul 8, 2024
7e1b233
Bump selenium-webdriver and @types/selenium-webdriver
dependabot[bot] Jul 22, 2024
5c39fa7
Bump @types/node from 20.14.4 to 22.0.0
dependabot[bot] Jul 29, 2024
838908c
Merge pull request #324 from nanasess/dependabot/npm_and_yarn/typed-r…
nanasess Aug 5, 2024
a48e307
Merge pull request #329 from nanasess/dependabot/npm_and_yarn/types/n…
nanasess Aug 5, 2024
3bcdb7d
Merge branch 'master' into dependabot/npm_and_yarn/multi-8c6a1b77c4
nanasess Aug 5, 2024
4085365
Use Corepack
nanasess Aug 9, 2024
f96b58c
Merge pull request #334 from nanasess/use-corepack
nanasess Aug 12, 2024
6303015
Bump @types/node from 22.1.0 to 22.2.0
dependabot[bot] Aug 12, 2024
aef6bf6
Merge pull request #335 from nanasess/dependabot/npm_and_yarn/types/n…
nanasess Aug 12, 2024
8e56715
Merge branch 'master' into dependabot/npm_and_yarn/multi-8c6a1b77c4
nanasess Aug 12, 2024
edd848c
Merge pull request #327 from nanasess/dependabot/npm_and_yarn/multi-8…
nanasess Aug 13, 2024
3fa005d
Bump @types/selenium-webdriver from 4.1.24 to 4.1.25
dependabot[bot] Aug 13, 2024
673fc63
Merge pull request #336 from nanasess/dependabot/npm_and_yarn/types/s…
nanasess Aug 13, 2024
3f0bad6
Bump @types/selenium-webdriver from 4.1.25 to 4.1.26
dependabot[bot] Aug 26, 2024
a433cad
Merge pull request #340 from nanasess/dependabot/npm_and_yarn/types/s…
nanasess Sep 9, 2024
06d773b
Bump micromatch from 4.0.7 to 4.0.8
dependabot[bot] Sep 9, 2024
094e3f6
Bump @vercel/ncc from 0.38.1 to 0.38.2
dependabot[bot] Sep 23, 2024
c135077
Merge pull request #350 from nanasess/dependabot/npm_and_yarn/vercel/…
nanasess Sep 27, 2024
f1d779f
Bump typed-rest-client from 2.0.2 to 2.1.0
dependabot[bot] Sep 30, 2024
9e8f0ea
Merge pull request #342 from nanasess/dependabot/npm_and_yarn/microma…
nanasess Oct 10, 2024
72cc80b
Bump @actions/core from 1.10.1 to 1.11.1
dependabot[bot] Oct 14, 2024
65de4e3
Merge pull request #355 from nanasess/dependabot/npm_and_yarn/actions…
nanasess Oct 16, 2024
cd1684c
feat: :sparkles: Add `CHROMEAPP` input variable
MickaelFontes Oct 30, 2024
6178bf6
docs: :memo: Update documentation about new `chromeapp` variable
MickaelFontes Oct 30, 2024
0f6afa3
style: :rotating_light: Formating
MickaelFontes Oct 30, 2024
2bd7bcb
build: :package: update build output files
MickaelFontes Oct 30, 2024
7df1211
fix: :wrench: fix configuration file command for package build
MickaelFontes Oct 30, 2024
ce2df44
fix: wrong empty string condition
MickaelFontes Oct 31, 2024
ec367c5
fix: wrong package name for `dpkg` lookup by default
MickaelFontes Oct 31, 2024
f321915
Bump @vercel/ncc from 0.38.2 to 0.38.3
dependabot[bot] Nov 18, 2024
92f85e6
Bump husky from 9.1.4 to 9.1.7
dependabot[bot] Nov 18, 2024
112df01
Bump cross-spawn from 7.0.3 to 7.0.6
dependabot[bot] Nov 19, 2024
dc294c4
feat: :sparkles: add `chromeapp` variable for Windows script
MickaelFontes Nov 24, 2024
ca022bd
chore: :package: update exported .fs files
MickaelFontes Nov 24, 2024
b039eb4
Add tests
nanasess Nov 25, 2024
a6ddbdf
Bump @types/node from 22.2.0 to 22.9.4
dependabot[bot] Nov 25, 2024
5418e30
Merge pull request #358 from MickaelFontes/chromeapp-input-variable
nanasess Dec 1, 2024
01ce9cf
Merge pull request #365 from nanasess/dependabot/npm_and_yarn/types/n…
nanasess Dec 1, 2024
8cd8060
Merge pull request #352 from nanasess/dependabot/npm_and_yarn/typed-r…
nanasess Dec 1, 2024
16b8067
Merge pull request #362 from nanasess/dependabot/npm_and_yarn/vercel/…
nanasess Dec 2, 2024
3fb5d73
Merge branch 'master' into dependabot/npm_and_yarn/husky-9.1.7
nanasess Dec 2, 2024
f21344b
build(deps-dev): bump @types/node from 22.9.4 to 22.10.1
dependabot[bot] Dec 3, 2024
f37f7d9
Merge pull request #363 from nanasess/dependabot/npm_and_yarn/husky-9…
nanasess Dec 3, 2024
8cf5b81
build(deps-dev): bump prettier from 3.3.3 to 3.4.1
dependabot[bot] Dec 3, 2024
03f95b5
Merge pull request #368 from nanasess/dependabot/npm_and_yarn/types/n…
nanasess Dec 3, 2024
7ba9bc9
Merge pull request #367 from nanasess/dependabot/npm_and_yarn/prettie…
nanasess Dec 3, 2024
d1a04fd
build(deps-dev): bump selenium-webdriver and @types/selenium-webdriver
dependabot[bot] Dec 3, 2024
73e3242
Merge pull request #364 from nanasess/dependabot/npm_and_yarn/cross-s…
nanasess Dec 3, 2024
e93e57b
Merge pull request #366 from nanasess/dependabot/npm_and_yarn/multi-2…
nanasess Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 34 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, ubuntu-20.04, macos-latest, macos-11 ]
os:
- ubuntu-latest
- ubuntu-24.04
- ubuntu-22.04
- ubuntu-20.04
- macos-latest
- macos-14
- macos-13
- macos-12
branch:
# - 'master'
- 'now'
Expand All @@ -39,10 +47,12 @@ jobs:
- run: yarn build
- run: yarn package
- 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
# - 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 All @@ -63,23 +73,33 @@ jobs:
if: matrix.branch == 'now'
with:
chromedriver-version: ${{ env.CHROMEDRIVER_VERSION }}
chromeapp: ${{ env.CHROMEAPP }}
- uses: nanasess/setup-chromedriver@master
if: matrix.branch == 'master'
with:
chromedriver-version: ${{ env.CHROMEDRIVER_VERSION }}
chromeapp: ${{ env.CHROMEAPP }}
- name: setup
run: |
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_modules/.bin/ts-node $GITHUB_WORKSPACE/__tests__/chromedriver.ts

test_default_version:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, ubuntu-20.04, macos-latest, macos-11 ]
os:
- ubuntu-latest
- ubuntu-24.04
- ubuntu-22.04
- ubuntu-20.04
- macos-latest
- macos-14
- macos-13
- macos-12
branch:
# - 'master'
- 'now'
Expand All @@ -93,10 +113,12 @@ jobs:
- run: yarn build
- run: yarn package
- 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
# - 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'
- uses: nanasess/setup-chromedriver@master
Expand All @@ -107,4 +129,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_modules/.bin/ts-node $GITHUB_WORKSPACE/__tests__/chromedriver.ts
30 changes: 18 additions & 12 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ jobs:
- run: yarn build
- run: yarn package
- 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
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 @@ -56,14 +58,16 @@ jobs:
if: matrix.branch == 'now'
with:
chromedriver-version: ${{ env.CHROMEDRIVER_VERSION }}
chromeapp: ${{ env.CHROMEAPP }}
- uses: nanasess/setup-chromedriver@master
if: matrix.branch == 'master'
with:
chromedriver-version: ${{ env.CHROMEDRIVER_VERSION }}
chromeapp: ${{ env.CHROMEAPP }}
- name: setup
run: |
chromedriver --url-base=/wd/hub &
node "$Env:GITHUB_WORKSPACE\__tests__\index.js"
node_modules\.bin\ts-node "$Env:GITHUB_WORKSPACE\__tests__\chromedriver.ts"

test_default_version:
runs-on: ${{ matrix.os }}
Expand All @@ -82,16 +86,18 @@ jobs:
- run: yarn build
- run: yarn package
- 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
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__\index.js"
node_modules\.bin\ts-node "$Env:GITHUB_WORKSPACE\__tests__\chromedriver.ts"
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ This action sets up a [ChromeDriver](https://chromedriver.chromium.org/) for use

## OS/Platform support

- ubuntu-latest, ubuntu-22.04 and ubuntu-20.04
- macos-latest, macos-12 and macos-11
- ubuntu-latest, ubuntu-24.04, ubuntu-22.04 and ubuntu-20.04
- macos-latest, macos-14, macos-13 and macos-12
- windows-latest, windows-2022 and windows-2019

# Usage
Expand All @@ -26,6 +26,8 @@ steps:
with:
# Optional: do not specify to match Chrome's version
chromedriver-version: '88.0.4324.96'
# Optional: if your chrome binary name is different
chromeapp: chrome
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
Expand Down
16 changes: 7 additions & 9 deletions __tests__/chromedriver.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { Builder, Capabilities, until, By, Key } from 'selenium-webdriver';
import { Builder, Capabilities, until, By, Key } from "selenium-webdriver";
(async () => {
const timeout = 30000;
const driver = new Builder()
.withCapabilities(Capabilities.chrome())
.build();
const driver = new Builder().withCapabilities(Capabilities.chrome()).build();
try {
await driver.get('https://google.com');
await driver.wait(until.titleContains('Google'), timeout);
await driver.get("https://google.com");
await driver.wait(until.titleContains("Google"), timeout);
console.log(await driver.getTitle());

const searchBox = await driver.findElement(By.name('q'));
await searchBox.sendKeys('ChromeDriver', Key.RETURN);
await driver.wait(until.titleContains('ChromeDriver'), timeout);
const searchBox = await driver.findElement(By.name("q"));
await searchBox.sendKeys("ChromeDriver", Key.RETURN);
await driver.wait(until.titleContains("ChromeDriver"), timeout);
console.log(await driver.getTitle());
} finally {
driver.quit();
Expand Down
16 changes: 9 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: 'setup-chromedriver'
description: 'Setup chromedriver'
author: 'nanasess'
name: "setup-chromedriver"
description: "Setup chromedriver"
author: "nanasess"
inputs:
chromedriver-version:
description: 'The chromedriver version to install'
description: "The chromedriver version to install"
required: false
chromeapp:
description: "Custom chrome binary name (for Linux or MacOS)"
required: false
runs:
using: 'node20'
main: 'dist/index.js'

using: "node20"
main: "dist/index.js"
Loading
Loading