forked from Xeio/IdleCodeRedeemer
-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (43 loc) · 1.47 KB
/
Copy pathtest.yml
File metadata and controls
53 lines (43 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Tests & Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
test:
name: Test & Coverage
runs-on: ubuntu-latest
permissions:
contents: read
actions: read # pento/lcov-coverage-check: list workflow runs and download baseline artifact
pull-requests: write # pento/lcov-coverage-check: post/update coverage comment on PRs
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install tools (Bun + Gitleaks via mise)
run: ./bin/mise install
- name: Install dependencies
run: ./bin/mise run install
- name: Type check
run: ./bin/mise run typecheck
- name: Run tests with coverage
run: ./bin/mise run test:coverage
# Stores lcov-baseline artifact on main; retrieves it and posts a coverage
# diff comment on PRs. Falls back to summary-only on first run or fork PRs.
- name: Report coverage
uses: pento/lcov-coverage-check@972428b8d5b3fbd8230df23ca4190ecce29979cd # v3.1.0
with:
path: "src/"
ignore-patterns: |
**/*.test.ts
**/test/**
github-token: ${{ secrets.GITHUB_TOKEN }}