Bump stylelint from 15.6.2 to 15.10.3 #73
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: Code Coverage Comparison | |
on: [pull_request] | |
# Default to bash | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
base_branch_cov: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.base_ref }} | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Install dependencies | |
run: npm ci | |
- name: Run test coverage | |
run: npm run coverage --if-present | |
- name: Run jest (coverage fallback) | |
run: "[[ ! -f ./coverage/lcov.info ]] && npm run jest || true" | |
- name: Run test (coverage fallback) | |
run: "[[ ! -f ./coverage/lcov.info ]] && npm run test || true" | |
- name: Upload code coverage for ref branch | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ref-lcov.info | |
path: ./coverage/lcov.info | |
checks: | |
runs-on: ubuntu-latest | |
needs: base_branch_cov | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Download code coverage report from base branch | |
uses: actions/download-artifact@v3 | |
with: | |
name: ref-lcov.info | |
- name: Install dependencies | |
run: npm ci | |
- name: Run test coverage | |
run: npm run coverage | |
# Compares two code coverage files and generates report as a comment | |
- name: Generate Code Coverage report | |
id: code-coverage | |
uses: barecheck/code-coverage-action@v1 | |
with: | |
barecheck-github-app-token: ${{ secrets.BARECHECK_GITHUB_APP_TOKEN }} | |
lcov-file: "./coverage/lcov.info" | |
base-lcov-file: "lcov.info" | |
minimum-ratio: 0 # Fails Github action once code coverage is decreasing | |
send-summary-comment: true | |
show-annotations: "warning" # Possible options warning|error |