From 9f92400bb690d23ef4766d4df8155f7af7a4500e Mon Sep 17 00:00:00 2001 From: Frazer Smith <43814140+Fdawgs@users.noreply.github.com> Date: Tue, 2 Feb 2021 09:34:12 +0000 Subject: [PATCH] Update readme and CI (#348) * build: update github-actions with dependabot * docs(readme): add snyk badge * docs(readme): update http links to https * docs(readme): remove mention of openapi v3 being unsupported * chore: reduce size of test script * ci: add coverage generation and badge * style: sort scripts alphabetically * chore: remove coverage threshold to pass ci --- .github/dependabot.yml | 8 ++++++-- .github/workflows/ci.yml | 18 +++++++++++++++++- README.md | 12 +++++++----- package.json | 3 ++- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6cab366c..d057a291 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,8 +1,12 @@ version: 2 updates: - - package-ecosystem: npm + - package-ecosystem: github-actions directory: '/' schedule: interval: daily open-pull-requests-limit: 10 - + - package-ecosystem: npm + directory: '/' + schedule: + interval: daily + open-pull-requests-limit: 10 \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39deac01..2224093a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,23 @@ jobs: - name: Prepare run: npm run prepare - name: Test - run: npm 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 diff --git a/README.md b/README.md index d61515f1..e3a7cf4a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # fastify-swagger -[![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-swagger/workflows/CI%20workflow/badge.svg) +![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/) [Swagger](https://swagger.io/) documentation generator for Fastify. It uses the schemas you declare in your routes to generate a swagger compliant doc. @@ -304,8 +307,7 @@ fastify.route({ minItems: 1, // // Note that this is an Open API version 2 configuration option. The - // options changed in version 3. The plugin currently only supports - // version 2 of Open API. + // options changed in version 3. // // Put `collectionFormat` on the same property which you are defining // as an array of values. (i.e. `collectionFormat` should be a sibling @@ -378,8 +380,8 @@ In that case checkout [fastify-swaggergen](https://github.com/seriousme/fastify- ## Acknowledgements This project is kindly sponsored by: -- [nearForm](http://nearform.com) -- [LetzDoIt](http://www.letzdoitapp.com/) +- [nearForm](https://nearform.com) +- [LetzDoIt](https://www.letzdoitapp.com/) ## License diff --git a/package.json b/package.json index 7e022902..0d643190 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,9 @@ "main": "index.js", "scripts": { "prepare": "node lib/util/prepare-swagger-ui", - "test": "standard && tap --100 test/*.js test/spec/**/*.js test/mode/*.js test/esm/*.js && npm run typescript", "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" }, "repository": {