Skip to content
Closed
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
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
run: uv pip install 'pydantic==${{ matrix.pydantic-version }}.*'

- run: mkdir coverage
- run: uv run --no-sync coverage run -m pytest
- run: uv run --no-sync coverage run -m pytest --junitxml=coverage/test-results.xml
env:
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-pydantic-${{ matrix.pydantic-version }}
- name: store coverage files
Expand Down Expand Up @@ -132,6 +132,12 @@ jobs:
file: ./coverage.xml
env_vars: PYTHON
- run: uv run coverage report --fail-under 100
- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
files: coverage/test-results.xml



test-pyodide:
name: test on Pyodide
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test

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

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]

- name: Run tests with coverage
run: |
pytest --cov=logfire --cov-report=xml --junitxml=test-results.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
fail_ci_if_error: true
- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
files: test-results.xml

Loading