Skip to content

Commit

Permalink
Merge pull request #164 from jeffbski/migrate-gh-actions
Browse files Browse the repository at this point in the history
Create node.js.yml for gh-actions
  • Loading branch information
jeffbski authored Sep 10, 2024
2 parents 0b193cf + c1a8527 commit 7cab7b0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -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: 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 7cab7b0

Please sign in to comment.