Skip to content

Commit

Permalink
tentative fix (n)
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Nov 1, 2024
1 parent 9393ae0 commit 5ac2f2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,15 @@ jobs:
- '3.11'
- '3.12'
- '3.13'
venv-loc: [bin]
include:
- os: ubuntu-20.04
python-version: '3.9'
venv-loc: bin
deps: minimal
install-args: --resolution=lowest-direct
- os: macos-latest
python-version: '3.13'
venv-loc: bin
- os: windows-latest
python-version: '3.13'
venv-loc: Scripts

runs-on: ${{ matrix.os }}
env:
Expand All @@ -58,8 +54,6 @@ jobs:
**/requirements/*.txt
**/pyproject.toml
# could in principle be done through uv sync but
# env resolution appears buggy as of uv 0.4.20
- run: |
uv venv
uv pip install . ${{ matrix.install-args }}
Expand All @@ -74,13 +68,14 @@ jobs:

- run: uv pip list

- name: Run pytest
shell: bash
# could in principle be done through uv run coverage
# but env resolution appears buggy as of uv 0.4.20
- name: Run pytest (without coverage)
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: uv run --no-project pytest --color=yes

- name: Run pytest (with coverage)
if: startsWith(matrix.os, 'ubuntu')
run: |
source .venv/${{matrix.venv-loc}}/activate
coverage run --parallel-mode -m pytest --color=yes
uv run --no-project coverage run --parallel-mode -m pytest --color=yes
- name: Upload coverage data
# only using reports from ubuntu because
Expand Down
12 changes: 3 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ combine-as-imports = true
known-first-party = ["nonos"]

[tool.pytest.ini_options]
addopts = "-ra"
filterwarnings = [
"error",
'ignore:datetime\.datetime\.utcfromtimestamp\(\) is deprecated:DeprecationWarning', # https://github.com/dateutil/dateutil/pull/1285
Expand All @@ -87,14 +88,8 @@ show_error_context = true
disallow_untyped_defs = false # TODO: add missing annotations and switch this option to true
ignore_missing_imports = true

[tool.coverage.paths]
source = [
"src",
"*/site-packages",
]

[tool.coverage.run]
branch = true
# branch = true
source = [
"src/nonos",
"tests",
Expand All @@ -105,8 +100,7 @@ omit = [

[tool.coverage.report]
show_missing = true
precision = 2
skip_covered = true
skip_covered = false
exclude_lines = [
# a stricter default pragma
"\\# pragma: no cover\\b",
Expand Down

0 comments on commit 5ac2f2c

Please sign in to comment.