Skip to content

Commit 007daa3

Browse files
committed
Force UTF-8 Unicode encoding when running tests both locally and in GitHub Actions
1 parent affe309 commit 007daa3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ jobs:
3636
run: uv sync --all-extras --dev
3737

3838
- name: Run tests
39-
run: uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests
39+
run: uv run python -Xutf8 -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests
4040

4141
- name: Run isolated tests
4242
run:
43-
uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests_isolated
43+
uv run python -Xutf8 -m pytest --cov --cov-config=pyproject.toml --cov-report=xml
44+
tests_isolated
4445

4546
- name: Upload test results to Codecov
4647
if: ${{ !cancelled() }}

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ typecheck: ## Perform type checking
3333
.PHONY: test
3434
test: ## Test the code with pytest.
3535
@echo "🚀 Testing code: Running pytest"
36-
@uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests
37-
@uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests_isolated
36+
@uv run python -Xutf8 -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests
37+
@uv run python -Xutf8 -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests_isolated
3838

3939
.PHONY: docs-test
4040
docs-test: ## Test if documentation can be built without warnings or errors

0 commit comments

Comments
 (0)