diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 2f79be49e..f67045406 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -6,6 +6,10 @@ on: branches: - main - 'feature/*' +env: + MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }} + MONGO_URI: ${{ vars.MONGO_URI }} + MONGO_USERNAME: ${{ vars.MONGO_USERNAME }} jobs: unit-testing: @@ -27,7 +31,35 @@ jobs: run: npm test - name: Archive Test Result + if: always() uses: actions/upload-artifact@v3 with: name: Mocha-Test-Result - path: test-results.xml \ No newline at end of file + path: test-results.xml + + code-coverage: + name: Coverage Testing + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup NodeJS Version + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install Dependencies + run: npm install + + - name: Unit Testing + continue-on-error: true + run: npm run coverage + + - name: Archive Test Result + if: always() + uses: actions/upload-artifact@v3 + with: + name: Code-Coverage-Result + path: coverage + retention-days: 5