Merge pull request #60 from sumanjitsg/develop #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverage Reporter | |
on: | |
push: | |
branches: main | |
jobs: | |
codacy-coverage-reporter: | |
name: Codacy Coverage Reporter | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Codebase | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Setup Cache | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Tests with Coverage | |
run: npm run coverage | |
- name: Run Codacy Coverage Reporter | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: __tests__/coverage/lcov.info |