Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
37 changes: 37 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test Coverage

on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run tests with coverage
run: npm run test:report

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
flags: unittests
name: codecov-strike
fail_ci_if_error: false
verbose: true
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Strike - NFT-Gated Gaming Platform

[![codecov](https://codecov.io/gh/proofofgame/strike/branch/main/graph/badge.svg)](https://codecov.io/gh/proofofgame/strike)
[![Tests](https://github.com/proofofgame/strike/actions/workflows/codecov.yml/badge.svg)](https://github.com/proofofgame/strike/actions/workflows/codecov.yml)

A blockchain-based gaming platform built on Stacks, featuring NFT-gated access and session-based gameplay with STX and sBTC rewards.

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

#### Error Codes

- `200` - ERR-SOLD-OUT: Mint limit reached
- `201` - ERR-WRONG-COMMISSION: Commission contract mismatch
- `202` - ERR-NOT-AUTHORIZED: Caller not authorized
- `203` - ERR-NOT-FOUND: NFT not found
- `204` - ERR-METADATA-FROZEN: Metadata cannot be changed
- `205` - ERR-MINT-ALREADY-SET: Mint address already configured
- `206` - ERR-LISTING: NFT listing error
- `207` - ERR-INVALID-SLOT: Slot number must be 1-5

## Development

### Setup
Expand Down
29 changes: 29 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
codecov:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "70...100"

status:
project:
default:
target: 70%
threshold: 5%
base: auto
patch:
default:
target: 80%
threshold: 5%

ignore:
- "tests/**"
- "node_modules/**"
- "*.config.js"
- "*.config.ts"

comment:
layout: "reach,diff,flags,files,footer"
behavior: default
require_changes: no
Loading