Skip to content

Commit b23e1ba

Browse files
authored
chore: ci updates and style change (#83)
* chore(package): sort scripts alphabetically ascending * docs(readme): add badges * ci: ignore documentation updates * style(ci): use standardized template
1 parent 11b9e9d commit b23e1ba

File tree

3 files changed

+32
-14
lines changed

3 files changed

+32
-14
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
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:
515
runs-on: ubuntu-latest
16+
617
strategy:
718
matrix:
819
node-version: [10.x, 12.x, 14.x]
@@ -14,20 +25,24 @@ jobs:
1425
options: --entrypoint redis-server
1526
steps:
1627
- uses: actions/checkout@v2
17-
- name: Use Node.js ${{ matrix.node-version }}
28+
29+
- name: Use Node.js
1830
uses: actions/[email protected]
1931
with:
20-
node-version: ${{ matrix.node-version }}
21-
- name: Install Dependencies
22-
run: npm install --ignore-scripts
23-
- name: Test
24-
run: npm test
32+
node-version: ${{ matrix.node-version }}
33+
34+
- name: Install Dependencies
35+
run: |
36+
npm install --ignore-scripts
37+
38+
- name: Run Tests
39+
run: |
40+
npm run test
2541
2642
automerge:
2743
needs: test
2844
runs-on: ubuntu-latest
2945
steps:
3046
- uses: fastify/[email protected]
31-
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }}
3247
with:
33-
github-token: ${{secrets.github_token}}
48+
github-token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# fastify-redis
22

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

58
Fastify Redis connection plugin, with this you can share the same Redis connection in every part of your server.
69

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"main": "index.js",
66
"types": "index.d.ts",
77
"scripts": {
8-
"test": "npm run lint && npm run unit && npm run typescript",
98
"lint": "standard",
10-
"unit": "tap test/test.js",
9+
"redis": "docker run -p 6379:6379 --rm redis:5",
10+
"test": "npm run lint && npm run unit && npm run typescript",
1111
"typescript": "tsd",
12-
"redis": "docker run -p 6379:6379 --rm redis:5"
12+
"unit": "tap test/test.js"
1313
},
1414
"repository": {
1515
"type": "git",

0 commit comments

Comments
 (0)