Skip to content

Commit 093cf1d

Browse files
committed
ci: aggiungi job test con pytest e codecov, build dipende da test
- job test: pytest --cov su ubuntu-latest python 3.12, upload coverage codecov - job build: needs test, gira solo dopo test passati - trigger: push+PR su src/** tests/** pyproject.toml
1 parent 6864f6f commit 093cf1d

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/build-context.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,38 @@ on:
1010
paths:
1111
- 'dataciviclab.config.yml'
1212
- 'src/**'
13+
- 'tests/**'
14+
- 'pyproject.toml'
15+
pull_request:
16+
paths:
17+
- 'src/**'
18+
- 'tests/**'
19+
- 'pyproject.toml'
1320

1421
jobs:
22+
test:
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/checkout@v6
27+
28+
- uses: actions/setup-python@v6
29+
with:
30+
python-version: '3.12'
31+
32+
- name: Install
33+
run: pip install -e ".[dev]"
34+
35+
- name: Test
36+
run: pytest --cov=src/agent_context_builder --cov-report=xml
37+
38+
- name: Upload coverage
39+
uses: codecov/codecov-action@v4
40+
with:
41+
fail_ci_if_error: false
42+
1543
build:
44+
needs: test
1645
runs-on: ubuntu-latest
1746
permissions:
1847
contents: write

0 commit comments

Comments
 (0)