diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2225817..ceb68685 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,5 @@ name: CI workflow + on: push: paths-ignore: @@ -11,52 +12,6 @@ on: jobs: test: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - node-version: [10, 12, 14, 16] - os: [macos-latest, ubuntu-latest, windows-latest] - - steps: - - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - - name: Install Dependencies - run: npm install --ignore-scripts - - - name: Prepare - run: npm run prepare - - - name: Test - run: npm run test:ci - - - name: Coveralls Parallel - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} - parallel: true - flag-name: run-${{ matrix.node-version }}-${{ matrix.os }} - - coverage: - needs: test - runs-on: ubuntu-latest - steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - parallel-finished: true - - automerge: - needs: test - runs-on: ubuntu-latest - steps: - - uses: fastify/github-action-merge-dependabot@v2.7.1 - if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} - with: - github-token: ${{secrets.github_token}} + uses: fastify/workflows/.github/workflows/plugins-ci.yml@v2 + with: + lint: true diff --git a/.taprc b/.taprc index 8e103e0e..f86eab80 100644 --- a/.taprc +++ b/.taprc @@ -1,4 +1,6 @@ +100: true ts: false jsx: false flow: false -coverage: true \ No newline at end of file +coverage: true +check-coverage: true diff --git a/README.md b/README.md index 4a75d40d..1ff563ec 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ [![NPM version](https://img.shields.io/npm/v/fastify-swagger.svg?style=flat)](https://www.npmjs.com/package/fastify-swagger) ![CI workflow](https://github.com/fastify/fastify-swagger/workflows/CI%20workflow/badge.svg) [![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-swagger/badge.svg)](https://snyk.io/test/github/fastify/fastify-swagger) -[![Coverage Status](https://coveralls.io/repos/github/fastify/fastify-swagger/badge.svg?branch=master)](https://coveralls.io/github/fastify/fastify-swagger?branch=master) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) A Fastify plugin for serving a [Swagger UI](https://swagger.io/tools/swagger-ui/), using [Swagger (OpenAPI v2)](https://swagger.io/specification/v2/) or [OpenAPI v3](https://swagger.io/specification) schemas automatically generated from your route schemas, or from an existing Swagger/OpenAPI schema. diff --git a/package.json b/package.json index e06736bd..c0d80853 100644 --- a/package.json +++ b/package.json @@ -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 prepare && npm run coverage && npm run typescript", + "test:dev": "npm run lint && npm run unit && 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",