chore: add codecov into the repository #1
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: Report Code Coverage | |
on: | |
workflow_call: | |
pull_request: | |
types: ['opened', 'reopened', 'synchronize'] | |
jobs: | |
coverage: | |
name: Code Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.5.3 | |
with: | |
fetch-depth: 1 | |
- name: Setup Node | |
uses: actions/setup-node@v3.7.0 | |
with: | |
node-version-file: .nvmrc | |
cache: 'npm' | |
- name: Install Dependencies | |
run: yarn install | |
- name: Run Tests & Coverage | |
run: | | |
npm run test-coverage | |
# - name: Run Lint Checks | |
# run: | | |
# npm run check:lint | |
# npm run lint:fix | |
- name: Upload Coverage Reports to Codecov | |
uses: codecov/codecov-action@v3.1.4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: ./coverage | |
- name: Fix filesystem paths in generated reports | |
if: always() | |
run: | | |
sed -i 's+home/runner/work/rudder-looker-actions/rudder-looker-actions+/github/workspace+g' coverage/lcov.info | |
# sed -i 's+/home/runner/work/rudder-auth/rudder-auth+/github/workspace+g' reports/eslint.json | |