diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 698fcb169..943def7ab 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -9,6 +9,9 @@ on: pull_request: branches: [ main ] +permissions: + pull-requests: write + jobs: build: @@ -19,9 +22,6 @@ jobs: node-version: [18.x] mongodb-version: [4.4] - permissions: - pull-requests: write - steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: @@ -56,19 +56,12 @@ jobs: echo "isNotEmpty=false" >> $GITHUB_OUTPUT fi - - name: Install LCOV + - name: Upload test coverage report if: ${{ steps.check-lcov-non-empty.outputs.isNotEmpty == 'true'}} - run: | - sudo apt-get update && sudo apt-get install --assume-yes lcov - - - name: Report code coverage - if: ${{ steps.check-lcov-non-empty.outputs.isNotEmpty == 'true' }} - uses: zgosalvez/github-actions-report-lcov@v4 + uses: codecov/codecov-action@v3.1.5 with: - coverage-files: ./coverage/lcov.info - github-token: ${{ secrets.GITHUB_TOKEN }} - update-comment: true - + files: ./coverage/lcov.info + flags: unittests # - name: Exit if coverage condition not met # if: ${{ steps.test.outputs.exit_code }} != 0 # run: exit ${{ steps.test.outputs.exit_code }} diff --git a/src/db/index.js b/src/db/index.js index 671855ecf..d633f0577 100644 --- a/src/db/index.js +++ b/src/db/index.js @@ -2,6 +2,7 @@ const nodemailer = require('nodemailer'); const generator = require('generate-password'); const passwordHash = require('password-hash'); const validator = require('email-validator'); + const config = require('../config'); if (config.getDatabase().type === 'fs') {