From 65455f5647f48858dd58a2eecce174735f26e497 Mon Sep 17 00:00:00 2001 From: Jeff Barczewski Date: Tue, 10 Sep 2024 11:01:40 -0500 Subject: [PATCH 1/3] Create node.js.yml for gh-actions Migrate from travis-ci to github actions --- .github/workflows/node.js.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..093a954 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test From df619a92d2663319c2bc696c55d635b1458920a4 Mon Sep 17 00:00:00 2001 From: Jeff Barczewski Date: Tue, 10 Sep 2024 11:14:33 -0500 Subject: [PATCH 2/3] rename to CI --- .github/workflows/node.js.yml | 2 +- package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 093a954..6a69d26 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,7 +1,7 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs -name: Node.js CI +name: CI on: push: diff --git a/package.json b/package.json index dab4b48..e2e8456 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "scripts": { "lint": "eslint \"lib/**/*.js\" \"test/**/*.js\" \"bin/wait-on\"", "publish:next": "npm publish --tag next && npm view", - "test": "mocha --exit 'test/**/*.mocha.js'" + "test": "npm run lint && npm run test:mocha", + "test:mocha": "mocha --exit 'test/**/*.mocha.js'" }, "engines": { "node": ">=12.0.0" From c1a8527529ac992d8e68332f919d0ff69cbcdb14 Mon Sep 17 00:00:00 2001 From: Jeff Barczewski Date: Tue, 10 Sep 2024 11:15:37 -0500 Subject: [PATCH 3/3] update badge on readme to point to gh-actions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f11f92e..4ccb13b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ For http(s) resources wait-on will check that the requests are returning 2XX (su wait-on can also be used in reverse mode which waits for resources to NOT be available. This is useful in waiting for services to shutdown before continuing. (Thanks @skarbovskiy for adding this feature) -[![Build Status](https://travis-ci.com/jeffbski/wait-on.svg?branch=master)](https://travis-ci.com/jeffbski/wait-on) +[![CI](https://github.com/jeffbski/wait-on/actions/workflows/ci.yml/badge.svg)](https://github.com/jeffbski/wait-on/actions/workflows/ci.yml) ## Installation