diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2839ba..0e93491 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,8 +10,29 @@ on: - 'docs/**' - '*.md' +# This allows a subsequently queued workflow run to interrupt previous runs +concurrency: + group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" + cancel-in-progress: true + jobs: - build: + dependency-review: + name: Dependency Review + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + persist-credentials: false + + - name: Dependency review + uses: actions/dependency-review-action@v1 + + test: + name: Test runs-on: ${{ matrix.os }} permissions: contents: read @@ -20,21 +41,28 @@ jobs: node-version: [12, 14, 16] os: [macos-latest, ubuntu-latest, windows-latest] steps: - - name: Checkout + - name: Check out repo uses: actions/checkout@v3 - - name: Use Node.js + with: + persist-credentials: false + + - name: Setup Node ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - name: Restore cached dependencies uses: actions/cache@v3 with: path: node_modules key: node-modules-${{ hashFiles('package.json') }} + - name: Install dependencies - run: npm install + run: npm i --ignore-scripts + - name: Run Tests run: npm run test-ci + - name: Coveralls Parallel uses: coverallsapp/github-action@1.1.3 with: @@ -43,7 +71,7 @@ jobs: flag-name: run-${{ matrix.node-version }}-${{ matrix.os }} coverage: - needs: build + needs: test runs-on: ubuntu-latest steps: - name: Coveralls Finished @@ -53,11 +81,15 @@ jobs: parallel-finished: true automerge: - needs: build - runs-on: ubuntu-latest + name: Automerge Dependabot PRs + if: > + github.event_name == 'pull_request' && + github.event.pull_request.user.login == 'dependabot[bot]' + needs: test permissions: pull-requests: write contents: write + runs-on: ubuntu-latest steps: - uses: fastify/github-action-merge-dependabot@v3 with: diff --git a/.gitignore b/.gitignore index 6704566..20dae0f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ npm-debug.log* yarn-debug.log* yarn-error.log* lerna-debug.log* +.pnpm-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json @@ -41,8 +42,8 @@ build/Release node_modules/ jspm_packages/ -# TypeScript v1 declaration files -typings/ +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ # TypeScript cache *.tsbuildinfo @@ -53,6 +54,9 @@ typings/ # Optional eslint cache .eslintcache +# Optional stylelint cache +.stylelintcache + # Microbundle cache .rpt2_cache/ .rts2_cache_cjs/ @@ -68,15 +72,20 @@ typings/ # Yarn Integrity file .yarn-integrity -# dotenv environment variables file +# dotenv environment variable files .env -.env.test +.env.development.local +.env.test.local +.env.production.local +.env.local # parcel-bundler cache (https://parceljs.org/) .cache +.parcel-cache # Next.js build output .next +out # Nuxt.js build / generate output .nuxt @@ -84,13 +93,20 @@ dist # Gatsby files .cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js +# Comment in the public line in if your project uses Gatsby and not Next.js # https://nextjs.org/blog/next-9-1#public-directory-support # public # vuepress build output .vuepress/dist +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + # Serverless directories .serverless/ @@ -102,3 +118,32 @@ dist # TernJS port file .tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# Vim swap files +*.swp + +# macOS files +.DS_Store + +# editor files +.vscode +.idea + +# lock files +package-lock.json +pnpm-lock.yaml +yarn.lock + +# 0x +.__browserify* +profile-* \ No newline at end of file diff --git a/README.md b/README.md index 14ed073..1748e8f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # pino-abstract-transport [![npm version](https://img.shields.io/npm/v/pino-abstract-transport)](https://www.npmjs.com/package/pino-abstract-transport) [![Build Status](https://img.shields.io/github/workflow/status/pinojs/pino-abstract-transport/CI)](https://github.com/pinojs/pino-abstract-transport/actions) -[![Known Vulnerabilities](https://snyk.io/test/github/pinojs/pino-abstract-transport/badge.svg)](https://snyk.io/test/github/pinojs/pino-abstract-transport) [![Coverage Status](https://coveralls.io/repos/github/pinojs/pino-abstract-transport/badge.svg?branch=master)](https://coveralls.io/github/pinojs/pino-abstract-transport?branch=master) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)