generate-coverall-report #61
This file contains hidden or 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 generator report | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| repository_dispatch: | |
| types: [ 'generate-coverall-report' ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - name: 'Checkout Project' | |
| uses: 'actions/checkout@v4' | |
| with: | |
| fetch-depth: 0 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: 'actions/setup-node@v4' | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: 'Determine branch from tag' | |
| run: | | |
| branch_name=$(git branch -r --contains $(git rev-parse HEAD) | grep -v '\->' | head -n 1 | sed 's/.*\///') | |
| echo "branch_name=$branch_name" >> $GITHUB_ENV | |
| - name: 'Install Dependencies' | |
| run: 'npm install' | |
| - name: 'Generate Coverage report files' | |
| env: | |
| CI: true | |
| run: 'npm run test -- --coverage --coverageDirectory=./tests/coverage' | |
| - name: 'Coveralls Parallel' | |
| uses: 'coverallsapp/github-action@master' | |
| with: | |
| git-branch: ${{ env.branch_name }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| parallel: true | |
| path-to-lcov: './tests/coverage/lcov.info' | |
| - name: 'Run codacy-coverage-reporter' | |
| uses: 'codacy/[email protected]' | |
| with: | |
| project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
| coverage-reports: './tests/coverage/lcov.info' | |
| - name: 'Coveralls Finished' | |
| uses: 'coverallsapp/github-action@master' | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| parallel-finished: true | |