feature/story_141: Exception Handlers | Reporting Hooks -- automated #3
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: Run Test Coverage | |
| permissions: | |
| contents: write | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Deno | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| - name: Install npm Dependencies | |
| run: deno install | |
| - name: Run Tests using secrets | |
| env: | |
| PROD_TOKEN: ${{ secrets.PROD_TOKEN }} | |
| PROD_REPO: ${{ secrets.PROD_REPO }} | |
| PROD_OWNER: ${{ secrets.PROD_OWNER }} | |
| TEAMS_WEB_HOOK: ${{ secrets.TEAMS_WEB_HOOK }} | |
| run: | | |
| deno test --allow-env --allow-read --allow-write --allow-net --allow-sys --allow-run --coverage=coverage --trace-leaks | |
| - name: Generate coverage report | |
| env: | |
| PROD_TOKEN: ${{ secrets.PROD_TOKEN }} | |
| PROD_REPO: ${{ secrets.PROD_REPO }} | |
| PROD_OWNER: ${{ secrets.PROD_OWNER }} | |
| TEAMS_WEB_HOOK: ${{ secrets.TEAMS_WEB_HOOK }} | |
| run: | | |
| deno coverage coverage --lcov > coverage.lcov | |
| deno coverage coverage --html report | |
| echo "HTML coverage in ./report/index.html" | |
| - name: Upload coverage HTML | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: html-coverage | |
| path: coverage/html/index.html |