Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize CI #15

Merged
merged 8 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
96 changes: 96 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: ci

on: [push, pull_request]

jobs:
legacy:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ['0.10', '0.12', 4.x, 6.x, 8.x, 10.x, 12.x, 13.x, 14.x, 15.x, 16.x]

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: |
npm install --production && npm install tape

- name: Run tests
run: |
npm run test

test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: |
npm install

- name: Run tests
run: |
npm run test:coverage

types:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install
run: |
npm install

- name: Run types tests
run: |
npm run typescript

lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install
run: |
npm install

- name: Lint
run: |
npm run lint
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Matteo Collina
Copyright (c) 2015-2024 Matteo Collina

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# reusify

[![npm version][npm-badge]][npm-url]
[![Build Status][travis-badge]][travis-url]
[![Coverage Status][coveralls-badge]][coveralls-url]

Reuse your objects and functions for maximum speed. This technique will
make any function run ~10% faster. You call your functions a
Expand Down Expand Up @@ -139,7 +137,3 @@ MIT

[npm-badge]: https://badge.fury.io/js/reusify.svg
[npm-url]: https://badge.fury.io/js/reusify
[travis-badge]: https://api.travis-ci.org/mcollina/reusify.svg
[travis-url]: https://travis-ci.org/mcollina/reusify
[coveralls-badge]: https://coveralls.io/repos/mcollina/reusify/badge.svg?branch=master&service=github
[coveralls-url]: https://coveralls.io/github/mcollina/reusify?branch=master
14 changes: 14 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict'

const base = require('neostandard')({})

module.exports = [
...base,
{
name: 'old-standard',
rules: {
'no-var': 'off',
'object-shorthand': 'off',
}
}
]
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
"main": "reusify.js",
"types": "reusify.d.ts",
"scripts": {
"lint": "standard",
"test": "tape test.js | faucet",
"istanbul": "istanbul cover tape test.js",
"coverage": "npm run istanbul; cat coverage/lcov.info | coveralls",
"lint": "eslint",
"test": "tape test.js",
"test:coverage": "c8 --100 tape test.js",
"test:typescript": "tsc"
},
"pre-commit": [
Expand Down Expand Up @@ -39,12 +38,13 @@
},
"devDependencies": {
"@types/node": "^20.1.0",
"coveralls": "^2.13.3",
"faucet": "0.0.1",
"istanbul": "^0.4.5",
"eslint": "^9.13.0",
"neostandard": "^0.11.7",
"pre-commit": "^1.2.2",
"standard": "^10.0.3",
"tape": "^4.8.0",
"tape": "^5.0.0",
"c8": "^10.1.2",
"typescript": "^5.2.2"
},
"dependencies": {
}
}
Loading