Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed .github/workflows/a.yml
Empty file.
29 changes: 14 additions & 15 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
name: 'coverage'
name: CI

on:
push:
branches: [ "main" ]
pull_request:
branches:
- main
branches: [ "main" ]
workflow_dispatch:

jobs:
coverage:
build:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- name: Checkout code
uses: actions/checkout@v3
pull-requests: write
contents: write

- name: Run Jest Coverage Report
uses: step-security/jest-coverage-report-action@fix_RemoveVuln
steps:
- uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@rc
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
output: report-markdown # Generate markdown output without attaching a comment

- name: Output Jest Coverage Result
run: echo "${{ steps.coverage.outputs.report }}" # Output the coverage report in markdown format
egress-policy: audit
- uses: step-security/jest-coverage-report-action@main
18 changes: 17 additions & 1 deletion __tests__/example.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,20 @@
test('adds 1 + 2 to equal 3', () => {
expect(1 + 2).toBe(3);
});



test('adds 2 + 2 to equal 4', () => {
expect(2 + 2).toBe(4);
});

test('adds 2 + 2 to equal 5', () => {
expect(2 + 3).toBe(5);
});

test('adds 2 + 4 to equal 6', () => {
expect(2 + 4).toBe(6);
});

test('adds 2 + 5 to equal 7', () => {
expect(2 + 5).toBe(7);
});