From 0fee0fc1cdff32ec9d62f24af3678eb45045133f Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Thu, 11 Feb 2021 11:57:10 +0000 Subject: [PATCH 1/5] ci(dependabot): auto update github actions --- .github/dependabot.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4872c5a..5e48d4e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,12 @@ version: 2 updates: -- package-ecosystem: npm - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 + - 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 From cb045584272b00a321566dd31113122b4bb8ce56 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Thu, 11 Feb 2021 12:16:14 +0000 Subject: [PATCH 2/5] docs(readme): add badges --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c01db99..43bf894 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # env-schema -[![Greenkeeper badge](https://badges.greenkeeper.io/fastify/env-schema.svg)](https://greenkeeper.io/) -[![Build Status](https://travis-ci.com/fastify/env-schema.svg?branch=master)](https://travis-ci.com/fastify/env-schame) -[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) +![CI workflow](https://github.com/fastify/env-schema/workflows/CI%20workflow/badge.svg) +[![NPM version](https://img.shields.io/npm/v/env-schema.svg?style=flat)](https://www.npmjs.com/package/env-schema) +[![Known Vulnerabilities](https://snyk.io/test/github/fastify/env-schema/badge.svg)](https://snyk.io/test/github/fastify/env-schema) +[![Coverage Status](https://coveralls.io/repos/github/fastify/env-schema/badge.svg?branch=master)](https://coveralls.io/github/fastify/env-schema?branch=master) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) Utility to check environment variables using [JSON schema](https://json-schema.org/), [Ajv](http://npm.im/ajv) and [dotenv](http://npm.im/dotenv). From 6ebccda53b8a0f85a4a9167666e7ee86fe116fa3 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Thu, 11 Feb 2021 12:29:47 +0000 Subject: [PATCH 3/5] ci: ignore documentation updates --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 480fea7..5057155 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,13 @@ name: CI workflow -on: [push, pull_request] +on: + push: + paths-ignore: + - 'docs/**' + - '*.md' + pull_request: + paths-ignore: + - 'docs/**' + - '*.md' jobs: test: runs-on: ubuntu-latest From 2d08a36e7c96fdddecfb5d622c9307fcbf6ad0a9 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Thu, 11 Feb 2021 13:12:30 +0000 Subject: [PATCH 4/5] chore: remove greenkeeper config greenkeeper no longer running --- package.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/package.json b/package.json index 3f2c648..633491a 100644 --- a/package.json +++ b/package.json @@ -38,12 +38,6 @@ "ajv": "^6.10.2", "dotenv": "^8.2.0" }, - "greenkeeper": { - "ignore": [ - "dotenv", - "tap" - ] - }, "tsd": { "directory": "test/types" } From 43a1c946ec2fd619fb88e22f4860c47039c4f8c4 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Thu, 11 Feb 2021 13:38:07 +0000 Subject: [PATCH 5/5] ci: add parallel test coverage calculation --- .github/workflows/ci.yml | 34 +++++++++++++++++++++++++--------- package.json | 1 + 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5057155..2ddf136 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,15 +15,31 @@ jobs: matrix: node-version: [10.x, 12.x, 14.x] steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install Dependencies - run: npm install --ignore-scripts - - name: Test - run: npm test + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Install Dependencies + run: npm install --ignore-scripts + - name: Tests + run: npm run test:ci + - name: Coveralls Parallel + uses: coverallsapp/github-action@v1.1.2 + 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@v1.1.2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true automerge: needs: test diff --git a/package.json b/package.json index 633491a..7cd3727 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "index.js", "scripts": { "test": "standard | snazzy && tap test/*.test.js && npm run typescript", + "test:ci": "standard | snazzy && tap test/*.test.js --coverage-report=lcovonly && npm run typescript", "typescript": "tsd" }, "repository": {