Skip to content

Commit b288198

Browse files
committed
Add Codecov integration
1 parent ebd89db commit b288198

7 files changed

Lines changed: 833 additions & 389 deletions

File tree

.github/workflows/codecov.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test Coverage
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
pull_request:
7+
branches: [main, dev]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run tests with coverage
27+
run: npm run test:report
28+
29+
- name: Upload coverage to Codecov
30+
uses: codecov/codecov-action@v4
31+
with:
32+
token: ${{ secrets.CODECOV_TOKEN }}
33+
files: ./coverage/lcov.info
34+
flags: unittests
35+
name: codecov-strike
36+
fail_ci_if_error: false
37+
verbose: true

README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Strike - NFT-Gated Gaming Platform
22

3+
[![codecov](https://codecov.io/gh/proofofgame/strike/branch/main/graph/badge.svg)](https://codecov.io/gh/proofofgame/strike)
4+
[![Tests](https://github.com/proofofgame/strike/actions/workflows/codecov.yml/badge.svg)](https://github.com/proofofgame/strike/actions/workflows/codecov.yml)
5+
36
A blockchain-based gaming platform built on Stacks, featuring NFT-gated access and session-based gameplay with STX and sBTC rewards.
47

58
## Key Features
@@ -362,17 +365,6 @@ NFT contract with marketplace functionality implementing SIP-009 standard.
362365
- **ERR-LISTING** (u206): NFT listing error
363366
- **ERR-INVALID-SLOT** (u207): Slot number must be 1-5
364367

365-
#### Error Codes
366-
367-
- `200` - ERR-SOLD-OUT: Mint limit reached
368-
- `201` - ERR-WRONG-COMMISSION: Commission contract mismatch
369-
- `202` - ERR-NOT-AUTHORIZED: Caller not authorized
370-
- `203` - ERR-NOT-FOUND: NFT not found
371-
- `204` - ERR-METADATA-FROZEN: Metadata cannot be changed
372-
- `205` - ERR-MINT-ALREADY-SET: Mint address already configured
373-
- `206` - ERR-LISTING: NFT listing error
374-
- `207` - ERR-INVALID-SLOT: Slot number must be 1-5
375-
376368
## Development
377369

378370
### Setup

codecov.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
codecov:
2+
require_ci_to_pass: yes
3+
4+
coverage:
5+
precision: 2
6+
round: down
7+
range: "70...100"
8+
9+
status:
10+
project:
11+
default:
12+
target: 70%
13+
threshold: 5%
14+
base: auto
15+
patch:
16+
default:
17+
target: 80%
18+
threshold: 5%
19+
20+
ignore:
21+
- "tests/**"
22+
- "node_modules/**"
23+
- "*.config.js"
24+
- "*.config.ts"
25+
26+
comment:
27+
layout: "reach,diff,flags,files,footer"
28+
behavior: default
29+
require_changes: no

0 commit comments

Comments
 (0)