Skip to content

Commit

Permalink
Add tests and report on github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
giggio committed Feb 22, 2024
1 parent 2cfb625 commit c91fa59
Show file tree
Hide file tree
Showing 9 changed files with 4,468 additions and 1,097 deletions.
10 changes: 9 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,13 @@
"no-console": "off",
"no-var": "error",
"prefer-const": "error"
}
},
"overrides": [
{
"files": ["tests/**/*"],
"env": {
"jest": true
}
}
]
}
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ on:

jobs:
build:
permissions:
actions: write
checks: write
pull-requests: write
name: Build amd64
runs-on: ${{ matrix.runner }}
strategy:
Expand Down Expand Up @@ -65,6 +69,32 @@ jobs:
- run: ./test-driver.sh
name: Verify install
shell: bash
- run: npm run test:ci
name: Run tests
continue-on-error: true
- name: Publish Report
uses: turing85/publish-report@v1
if: ${{ always() }}
with:
cancel-workflow-on-error: false
comment-header: my-comment-header
comment-message-success: |
{0} passed!
{1} tests were successful, {2} tests failed, {3} test were skipped.
The report can be found [here]({4}).
comment-message-failure: |
{0} failed!
{1} tests were successful, {2} tests failed, {3} test were skipped.
The report can be found [here]({4}).
report-fail-on-error: true
report-name: Tests ${{ matrix.runner }}-${{ matrix.node }}
report-path: junit.xml
report-reporter: jest-junit

build_arm64:
name: Build arm64
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
lib/chromedriver
tmp
npm-debug.log
*.tgz
*.tgz
junit.xml
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ azure-pipelines.yml
.github
.travis.yml
tsconfig.json
tests
junit.xml
781 changes: 395 additions & 386 deletions install.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/chromedriver.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fs = require('fs');
const path = require('path');
const fs = require('node:fs');
const path = require('node:path');
const tcpPortUsed = require('tcp-port-used');
function getPortFromArgs(args) {
let port = 9515;
Expand Down
Loading

0 comments on commit c91fa59

Please sign in to comment.