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

ci: Add test workflow #32

Merged
merged 1 commit into from
Feb 14, 2022
Merged
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
36 changes: 36 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: test
on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
name: Build and Lint on ${{ matrix.os }}, Node.js ${{ matrix.node-version }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
# Oldest supported LTS version through current LTS
node-version: [12.x, 14.x, 16.x]
os: [macOS-latest, windows-latest, ubuntu-latest]

steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Deps
run: npm ci
- name: Build Selenium DriverProvider JAR
run: npm run jar
- name: Test all packages
shell: bash
run: |
npm test
for i in backends/*/; do
pushd "$i"
npm test
popd
done
2 changes: 1 addition & 1 deletion backends/chromecast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"scripts": {
"lint": "(cd ../../; npx eslint --ignore-path .gitignore --max-warnings 0 backends/chromecast/)",
"checkClean": "[[ -z \"$(git status --short .)\" ]] || (echo \"Git not clean!\"; git status .; exit 1)",
"pretest": "npm run lint",
"test": "npm run lint",
"prepack": "npm run lint && npm run checkClean"
},
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion backends/chromeos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"scripts": {
"lint": "(cd ../../; npx eslint --ignore-path .gitignore --max-warnings 0 backends/chromeos/)",
"checkClean": "[[ -z \"$(git status --short .)\" ]] || (echo \"Git not clean!\"; git status .; exit 1)",
"pretest": "npm run lint",
"test": "npm run lint",
"prepack": "npm run lint && npm run checkClean"
},
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion backends/fake/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"scripts": {
"lint": "(cd ../../; npx eslint --ignore-path .gitignore --max-warnings 0 backends/fake/)",
"checkClean": "[[ -z \"$(git status --short .)\" ]] || (echo \"Git not clean!\"; git status .; exit 1)",
"pretest": "npm run lint",
"test": "npm run lint",
"prepack": "npm run lint && npm run checkClean"
},
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion backends/tizen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"scripts": {
"lint": "(cd ../../; npx eslint --ignore-path .gitignore --max-warnings 0 backends/tizen/)",
"checkClean": "[[ -z \"$(git status --short .)\" ]] || (echo \"Git not clean!\"; git status .; exit 1)",
"pretest": "npm run lint",
"test": "npm run lint",
"prepack": "npm run lint && npm run checkClean"
},
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion backends/xboxone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"scripts": {
"lint": "(cd ../../; npx eslint --ignore-path .gitignore --max-warnings 0 backends/xboxone/)",
"checkClean": "[[ -z \"$(git status --short .)\" ]] || (echo \"Git not clean!\"; git status .; exit 1)",
"pretest": "npm run lint",
"test": "npm run lint",
"prepack": "npm run lint && npm run checkClean"
},
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"lint": "eslint --ignore-path .gitignore --max-warnings 0 .",
"jar": "ant -f java/build.xml jar && cp java/build/jar/*.jar java/third_party/selenium*.jar ./",
"checkClean": "[[ -z \"$(git status --short .)\" ]] || (echo \"Git not clean!\"; git status .; exit 1)",
"pretest": "npm run lint",
"test": "npm run lint",
"prepack": "npm run lint && npm run checkClean && npm run jar"
},
"dependencies": {
Expand Down