Skip to content

feat: added automatic pr for devops #24

feat: added automatic pr for devops

feat: added automatic pr for devops #24

name: Test and 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/[email protected]
with:
fetch-depth: 1
- name: Setup Node
uses: actions/[email protected]
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
if: always()
uses: codecov/[email protected]
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
# - name: SonarCloud Scan
# if: always()
# uses: SonarSource/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.PAT }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}