Bump GitHub CI Action to upload-artifact@v4
and download-artifact@v4
#71
Workflow file for this run
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: CI Testing & Coverage | |
on: | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
base_branch_coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.base_ref }} | |
- name: Use Node.js Latest | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Tests & Generate Coverage | |
run: npm test | |
- name: Upload Code Coverage for Bash Branch | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ref-lcov.info | |
path: ./coverage/lcov.info | |
source_branch_coverage: | |
runs-on: ubuntu-latest | |
needs: base_branch_coverage | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout Branch | |
uses: actions/checkout@v4 | |
- name: Use Node.js Latest | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Download Code Coverage Report from Base Branch | |
uses: actions/download-artifact@v4 | |
with: | |
name: ref-lcov.info | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Tests & Generate Coverage | |
run: npm test | |
- name: Generate Code Coverage Report | |
id: code-coverage | |
uses: barecheck/code-coverage-action@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
lcov-file: "./coverage/lcov.info" | |
base-lcov-file: "./lcov.info" | |
send-summary-comment: true | |
show-annotations: "warning" | |