-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.11 KB
/
Copy pathtests.yml
File metadata and controls
47 lines (39 loc) · 1.11 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
# .github/workflows/tests.yml - CI/CD para ColCript
name: Tests
# Cuándo ejecutar:
# - Cada push a main
# - Cada pull request
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
# 1. Descargar código
- name: Checkout code
uses: actions/checkout@v3
# 2. Configurar Python
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
# 3. Instalar dependencias
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov
# 4. Ejecutar tests
- name: Run tests with coverage
run: |
pytest tests/ -v --cov=blockchain --cov=wallet --cov=contracts --cov=mining --cov=network --cov=utils --cov-report=term-missing --cov-report=xml
# 5. Subir coverage report (opcional)
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false