Skip to content

Commit

Permalink
chore(repo): update deps and add GH workflows (#27)
Browse files Browse the repository at this point in the history
* chore(repo): update deps and add GH workflows

* fix: correct codeowners

* ci(fix): update cache-dependency-path

* ci: add lockfile

* test: move after hook and switch to async/await

---------

Co-authored-by: Richard Markins <[email protected]>
  • Loading branch information
rmarkins-godaddy and rxmarbles authored Jul 8, 2024
1 parent 8dcf8d8 commit 4b815e2
Show file tree
Hide file tree
Showing 11 changed files with 3,241 additions and 39 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @godaddy/javascript
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
29 changes: 29 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Continuous Integration

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,3 @@ build
# Arbitrary tarballs
*.tar.gz
*.tgz

# Locks
yarn.lock
package-lock.json
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion example/lib/middlewares.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let rid = 0;

module.exports = function middlwares(app, options, callback) {
app.perform('middlewares', function performMiddlewares(next) {
app.use(function httpLogger (req, res, next) {
app.use(function httpLogger(req, res, next) {
app.log.info('%s - request - %s', req.method, req.url, {
rid: ++rid
});
Expand Down
2 changes: 1 addition & 1 deletion example/lib/preboots/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = function db(app, options, callback) {
// Pretend database stub to show that preboots are especially useful for
// async initialization
//
function DB (options) {}
function DB(options) {}

DB.prototype.connect = function connect(callback) {
setImmediate(callback);
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"license": "ISC",
"dependencies": {
"slay": "^4.0.0",
"winston": "~2.3.0"
"winston": "~3.13.0"
}
}
Loading

0 comments on commit 4b815e2

Please sign in to comment.