Skip to content

Commit 3a8d3b4

Browse files
authored
chore: ci updates and style change (#55)
* docs(readme): add badges * ci: ignore documentation updates * ci: test on multiple os * style(ci): use standardized template * docs(readme): update http link to https * chore: remove duplicate script
1 parent a161d39 commit 3a8d3b4

File tree

3 files changed

+42
-20
lines changed

3 files changed

+42
-20
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,43 @@
1-
name: CI workflow
2-
on: [push, pull_request]
1+
name: CI
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'docs/**'
7+
- '*.md'
8+
pull_request:
9+
paths-ignore:
10+
- 'docs/**'
11+
- '*.md'
12+
313
jobs:
414
test:
5-
runs-on: ubuntu-latest
15+
runs-on: ${{ matrix.os }}
16+
617
strategy:
718
matrix:
819
node-version: [10.x, 12.x, 14.x]
20+
os: [macos-latest, ubuntu-latest, windows-latest]
21+
922
steps:
10-
- uses: actions/checkout@v2
11-
- name: Use Node.js ${{ matrix.node-version }}
12-
uses: actions/[email protected]
13-
with:
14-
node-version: ${{ matrix.node-version }}
15-
- name: Install Dependencies
16-
run: npm install --ignore-scripts
17-
- name: Lint
18-
run: npm run lint-ci
19-
- name: Test
20-
run: npm run test-ci
23+
- uses: actions/checkout@v2
24+
25+
- name: Use Node.js
26+
uses: actions/[email protected]
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
30+
- name: Install Dependencies
31+
run: |
32+
npm install --ignore-scripts
33+
34+
- name: Lint
35+
run: |
36+
npm run lint:ci
37+
38+
- name: Run Tests
39+
run: |
40+
npm run test
2141
2242
automerge:
2343
needs: test
@@ -26,4 +46,4 @@ jobs:
2646
- uses: fastify/[email protected]
2747
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }}
2848
with:
29-
github-token: ${{secrets.github_token}}
49+
github-token: ${{ secrets.GITHUB_TOKEN }}

Readme.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# fastify-caching
22

3-
![CI workflow](https://github.com/fastify/fastify-caching/workflows/CI%20workflow/badge.svg)
3+
![CI](https://github.com/fastify/fastify-caching/workflows/CI/badge.svg)
4+
[![NPM version](https://img.shields.io/npm/v/fastify-caching.svg?style=flat)](https://www.npmjs.com/package/fastify-caching)
5+
[![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-caching/badge.svg)](https://snyk.io/test/github/fastify/fastify-caching)
6+
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)
47

58
*fastify-caching* is a plugin for the [Fastify](http://fastify.io/) framework
69
that provides mechanisms for manipulating HTTP cache headers according to
@@ -146,4 +149,4 @@ object, or a string that is a valid date string according to
146149

147150
## License
148151

149-
[MIT License](http://jsumners.mit-license.org/)
152+
[MIT License](https://jsumners.mit-license.org/)

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
"description": "A plugin for Fastify to enable management of cache control headers",
55
"main": "plugin.js",
66
"scripts": {
7-
"test": "tap test/*.test.js",
8-
"test-ci": "tap --cov test/*.test.js",
97
"lint": "standard --verbose | snazzy",
10-
"lint-ci": "standard"
8+
"lint:ci": "standard",
9+
"test": "tap test/*.test.js"
1110
},
1211
"precommit": [
1312
"lint",

0 commit comments

Comments
 (0)