Skip to content

Commit

Permalink
build: upgrade to Node.js 20 (#29)
Browse files Browse the repository at this point in the history
* ci: modernize pipeline

* deps: bump dev dependencies

* docs: typo

* build: force exit jest tests to avoid getting stack on unresolved handles

* build: upgrade Node.js 20

* chore: add engine requirement

* ci: restore build job

* ci: use correct output folder
  • Loading branch information
alexplischke authored Oct 10, 2023
1 parent 52ca363 commit cac5500
Show file tree
Hide file tree
Showing 6 changed files with 1,724 additions and 1,748 deletions.
42 changes: 27 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,44 @@ on:
- main

jobs:
sanity:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: install devDependencies
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Dependencies
run: npm ci
- name: run the tests
run: npm test
- name: build new dist

- name: Build
run: npx ncc build src/index.js -o dist/reference
- name: compare actual build with expected

- name: Compare Distribution
run: diff -U 5 dist/reference/index.js dist/main/index.js
build:

test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: install devDependencies
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Dependencies
run: npm ci
- name: run the tests

- name: Test
run: npm test
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
3 changes: 2 additions & 1 deletion dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16314,7 +16314,7 @@ async function awaitExecution(child) {

// Enhanced timeout security: Wait for the process to exit, or no output for 2 minutes.
// Saucectl is expected to output one . per second, so this is quite conservative to keep
// this thereshold at 2 minutes.
// this threshold at 2 minutes.
while (!exited) {
const currentTime = new Date().getTime();
const twoMinutes = 2 * 60 * 1000;
Expand All @@ -16329,6 +16329,7 @@ async function awaitExecution(child) {

module.exports = { awaitExecution };


/***/ }),

/***/ 1430:
Expand Down
Loading

0 comments on commit cac5500

Please sign in to comment.