Skip to content

ci: aggiungi job test con pytest e codecov#27

Merged
Gabrymi93 merged 2 commits into
mainfrom
ci-add-test-job
Apr 24, 2026
Merged

ci: aggiungi job test con pytest e codecov#27
Gabrymi93 merged 2 commits into
mainfrom
ci-add-test-job

Conversation

@Gabrymi93

Copy link
Copy Markdown
Member

Sintesi

Aggiunge un job test alla CI che gira pytest con coverage reporting, e rende il job build dipendente dal superamento dei test.

Cosa cambia

  • trigger pull_request: nuovo, oltre al già esistente push su main
  • path filter allargato: tests/** e pyproject.toml inclusi oltre a src/**
  • job test: pytest --cov su ubuntu-latest python 3.12, upload coverage su codecov
  • job build: needs: test — non gira se i test falliscono

Cron e workflow_dispatch continuano a funzionare indipendentemente.

Verifica

  • pytest -q verde in locale (56 passed)
  • CI verde su questo branch

Schema

jobs:
  test:     ← gira su PR e push
    needs:  []
    runs:   ubuntu-latest
    steps:  checkout → python 3.12 → pip install -e ".[dev]" → pytest --cov → codecov

  build:    ← gira solo dopo test passati
    needs:  [test]
    runs:   ubuntu-latest
    steps:  checkout → python 3.12 → pip install -e . → agent-context build → publish to context branch

- 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
- build: if: github.event_name != 'pull_request' — evita publish da PR (tokn
  read-only su fork, semantica sbagliata su PR interne)
- pull_request trigger: branches: [main] per coerenza con push trigger
@Gabrymi93
Gabrymi93 merged commit 8df9cfb into main Apr 24, 2026
@Gabrymi93
Gabrymi93 deleted the ci-add-test-job branch April 24, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant