From c9db2d267c90bfa171cb341a16757bfa363d48c7 Mon Sep 17 00:00:00 2001 From: Saikumar Date: Fri, 17 Jan 2025 13:06:07 +0530 Subject: [PATCH] test: coverage and test cases --- .github/workflows/test.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ae67556 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,23 @@ +name: Publish the Errsole MongoDB package to npm +on: + push: + branches: + - master +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + - run: npm install + # Run tests and generate coverage report + - run: npm test -- --coverage + continue-on-error: false + # Send the coverage report to Coveralls + - run: npm install coveralls --save-dev + - run: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_MONGODB_TOKEN }} \ No newline at end of file