diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4790232..e4d1cd4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,16 +1,35 @@ name: CI -'on': + +on: push: paths-ignore: - - docs/** + - 'docs/**' - '*.md' pull_request: paths-ignore: - - docs/** + - 'docs/**' - '*.md' + jobs: + 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: runs-on: ubuntu-latest + permissions: + contents: read strategy: matrix: node-version: [14, 16, 18] @@ -22,24 +41,34 @@ jobs: env: discovery.type: single-node steps: - - uses: actions/checkout@v3 - - name: Use Node.js + - name: Check out repo + uses: actions/checkout@v3 + with: + persist-credentials: false + + - name: Setup Node ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - name: Install Dependencies - run: | - npm install --ignore-scripts - - name: Run Tests - run: | - npm test + + - name: Install dependencies + run: npm i --ignore-scripts + + - name: Run tests + run: npm test + automerge: + name: Automerge Dependabot PRs + if: > + github.event_name == 'pull_request' && + github.event.pull_request.user.login == 'dependabot[bot]' needs: test - runs-on: ubuntu-latest permissions: pull-requests: write contents: write + runs-on: ubuntu-latest steps: - uses: fastify/github-action-merge-dependabot@v3 with: github-token: ${{ secrets.GITHUB_TOKEN }} + target: major diff --git a/README.md b/README.md index e0a7978..7dec6ef 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ ![CI](https://github.com/fastify/fastify-elasticsearch/workflows/CI/badge.svg) [![NPM version](https://img.shields.io/npm/v/@fastify/elasticsearch.svg?style=flat)](https://www.npmjs.com/package/@fastify/elasticsearch) -[![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-elasticsearch/badge.svg)](https://snyk.io/test/github/fastify/fastify-elasticsearch) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) Fastify plugin for [Elasticsearch](https://www.elastic.co/elasticsearch/) for sharing the same ES client in every part of your server.