Skip to content

💚 Fix CI test suite for Windows and MacOS #1307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 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
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version:
- "3.8"
- "3.9"
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
name: coverage-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
path: coverage
include-hidden-files: true

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ source = [
]
context = '${CONTEXT}'
dynamic_context = "test_function"
relative_files = true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coverage test kept on giving this error for either MacOS or Windows:

No source for code: '/Users/runner/work/sqlmodel/sqlmodel/docs_src/__init__.py'.

This is fixed by using the relative_files setting 🎉


[tool.coverage.report]
show_missing = true
Expand Down
4 changes: 2 additions & 2 deletions tests/test_select_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def test_select_gen() -> None:
env = os.environ.copy()
env["CHECK_JINJA"] = "1"
result = subprocess.run(
[sys.executable, "scripts/generate_select.py"],
env=env,
[sys.executable, Path("scripts") / "generate_select.py"],
env={**os.environ},
check=True,
cwd=root_path,
capture_output=True,
Expand Down
Loading