Skip to content

Commit 4c13064

Browse files
authored
Merge pull request #3 from tumf/devin/1744788711-github-workflow-test-coverage
2 parents 9cfd723 + 1acf718 commit 4c13064

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed

.codecov.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
codecov:
2+
require_ci_to_pass: yes
3+
4+
coverage:
5+
precision: 2
6+
round: down
7+
range: "70...100"
8+
status:
9+
project:
10+
default:
11+
target: auto
12+
threshold: 0%
13+
patch:
14+
default:
15+
target: auto
16+
threshold: 0%
17+
18+
comment:
19+
layout: "reach,diff,flags,files,footer"
20+
behavior: default
21+
require_changes: no

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python 3.12
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.12'
20+
cache: 'pip'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install pytest-cov codecov
26+
pip install -e .
27+
28+
- name: Run tests with coverage
29+
env:
30+
ANKR_ENDPOINT: ${{ secrets.ANKR_ENDPOINT }}
31+
ANKR_PRIVATE_KEY: ${{ secrets.ANKR_PRIVATE_KEY }}
32+
run: |
33+
pytest --cov=web3_mcp --cov-report=xml --cov-report=term
34+
35+
- name: Upload coverage to Codecov
36+
uses: codecov/codecov-action@v4
37+
with:
38+
file: ./coverage.xml
39+
fail_ci_if_error: false
40+
# Token is optional for public repositories
41+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ wheels/
88

99
# Virtual environments
1010
.venv
11+
12+
# Coverage reports
13+
coverage.xml
14+
.coverage
15+
htmlcov/

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Web3 MCP
22

3+
[![Tests](https://github.com/tumf/web3-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/tumf/web3-mcp/actions/workflows/test.yml)
4+
[![codecov](https://codecov.io/gh/tumf/web3-mcp/branch/main/graph/badge.svg)](https://codecov.io/gh/tumf/web3-mcp)
5+
36
An MCP server implementation wrapping Ankr Advanced API.
47

58
## Overview

0 commit comments

Comments
 (0)