Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
143 changes: 71 additions & 72 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
push:
branches:
- main
- main
pull_request:

env:
Expand All @@ -16,123 +16,122 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
# grab default branch to calculate branch point to know when to stop linting
- if: ${{ github.base_ref }}
run: |
ref="${{ github.base_ref }}"
if git check-ref-format --branch "$ref"; then
git branch "$ref" "origin/$ref"
else
echo "Invalid base_ref: '$ref'"
exit 1
fi
- uses: actions/setup-node@v4

- run: yarn install --frozen-lockfile --ignore-scripts
- run: yarn lint:git
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
# grab default branch to calculate branch point to know when to stop linting
- if: ${{ github.base_ref }}
run: |
ref="${{ github.base_ref }}"
if git check-ref-format --branch "$ref"; then
git branch "$ref" "origin/$ref"
else
echo "Invalid base_ref: '$ref'"
exit 1
fi
- uses: actions/setup-node@v4
- run: yarn install --frozen-lockfile --ignore-scripts
- run: yarn lint:git

lint:
needs: lint-git

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v4
- uses: actions/setup-node@v4

- run: yarn install --frozen-lockfile --ignore-scripts
- run: yarn lint:md
- run: yarn lint:js
- run: yarn install --frozen-lockfile --ignore-scripts
- run: yarn lint:md
- run: yarn lint:js

test:
needs: lint

strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-latest
node:
- 18
- 20

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

# - run: curl -O https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_102.0.1245.39-1_amd64.deb
# - run: sudo apt install ./microsoft-edge-stable_102.0.1245.39-1_amd64.deb
# - uses: browser-actions/setup-edge@latest
# - run: curl -O https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_102.0.1245.39-1_amd64.deb
# - run: sudo apt install ./microsoft-edge-stable_102.0.1245.39-1_amd64.deb
# - uses: browser-actions/setup-edge@latest

- run: yarn install --frozen-lockfile
- run: yarn test
env:
WEBDRIVER_HEADLESS: true
- run: yarn install --frozen-lockfile
- run: yarn test
env:
WEBDRIVER_HEADLESS: true

acceptance:
needs: lint

strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
- ubuntu-latest
- macos-latest
- windows-latest
node:
- 18
- 20

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- run: yarn install --frozen-lockfile
- if: runner.os == 'Linux'
# https://github.com/juliangruber/browser-run/issues/147#issue-495226343
run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- run: yarn test:acceptance
env:
DISPLAY: :99.0

- if: failure()
uses: actions/upload-artifact@v4
with:
path: examples/full-suite/dist
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- run: yarn install --frozen-lockfile
- if: runner.os == 'Linux'
# https://github.com/juliangruber/browser-run/issues/147#issue-495226343
run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- run: yarn test:acceptance
env:
DISPLAY: :99.0

- if: failure()
uses: actions/upload-artifact@v4
with:
path: examples/full-suite/dist

global-install-test:
needs: lint

strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-latest
node:
- 18
- 20

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

# https://github.com/actions/setup-node/issues/85#issuecomment-715565131
- run: echo "$(yarn global bin)" >> $GITHUB_PATH
# https://github.com/actions/setup-node/issues/85#issuecomment-715565131
- run: echo "$(yarn global bin)" >> $GITHUB_PATH

- name: simulate global install
run: |
yarn install --production
yarn link
working-directory: fixtures/global-install
- name: simulate global install
run: |
yarn install --production
yarn link
working-directory: fixtures/global-install

- run: my-cli --headless
- run: my-cli --headless
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A different take on [WebDriver](https://www.w3.org/TR/webdriver1) browser testin

## Requirements

Make sure [Node.js](https://nodejs.org) 14.15+ is installed.
Make sure [Node.js](https://nodejs.org) 20.19+ is installed.

## Setup

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"url": "git+ssh://git@github.com/CrowdStrike/faltest.git"
},
"engines": {
"node": ">=18.12"
"node": ">=20.19"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

webdriverio needs min 20.19

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it might make sense to work on a WIP branch with node update + webdriverio first? That way we don’t have to use their restrictive node version if it doesn't work?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will use this branch for WIP

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial push generated lot of errors, like you said webdriverio upgrade needs work

},
"devDependencies": {
"@crowdstrike/commitlint": "^8.0.0",
Expand Down Expand Up @@ -51,7 +51,7 @@
"yargs-help-output": "^5.0.0"
},
"volta": {
"node": "18.20.8",
"node": "20.19.4",
"npm": "10.9.3",
"yarn": "1.22.22"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"geckodriver": "4.5.1",
"get-port": "^7.0.0",
"ps-list": "^8.0.0",
"webdriverio": "7.40.0",
"webdriverio": "9.18.4",
"yn": "^5.0.0"
},
"devDependencies": {
Expand Down
Loading
Loading