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

chore (ci): migrate ci to fastify plugins reusable workflows #531

Merged
merged 5 commits into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI workflow

on:
push:
paths-ignore:
Expand All @@ -10,12 +11,28 @@ on:
- '*.md'

jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install
run: npm install --ignore-scripts

- name: Lint code
run: npm run lint
test:
needs: linter
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [10, 12, 14, 16]
node-version: [10, 12, 14, 16, 17]
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
"description": "Serve Swagger/OpenAPI documentation for Fastify, supporting dynamic generation",
"main": "index.js",
"scripts": {
"coverage": "npm run unit -- --coverage-report=lcovonly",
"lint": "standard",
"lint:fix": "npm run lint -- --fix",
"prepare": "node lib/util/prepare-swagger-ui",
"prepublishOnly": "npm run prepare",
"test": "standard && tap --100 \"test/**/*.js\" && npm run typescript",
"test:ci": "standard && tap \"test/**/*.js\" --coverage-report=lcovonly && npm run typescript",
"typescript": "tsd"
"test": "npm run lint && npm run unit && npm run typescript",
"test:ci": "npm run coverage && npm run typescript",
"typescript": "tsd",
"unit": "tap -J \"test/**/*.js\"",
"unit:report": "npm run unit -- --coverage-report=html",
"unit:verbose": "npm run unit -- -Rspec"
},
"repository": {
"type": "git",
Expand Down