Skip to content

Commit 8012fbe

Browse files
fix: Fix setup error occurring on Windows and added Windows ci tests (#85)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent ebc0b72 commit 8012fbe

File tree

2 files changed

+37
-16
lines changed

2 files changed

+37
-16
lines changed

.github/workflows/python-test.yml

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,44 @@ on:
1313
- main
1414

1515
jobs:
16-
build:
16+
test-ubuntu:
1717
runs-on: ubuntu-latest
1818

1919
strategy:
2020
matrix:
21-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
21+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: Set up Python
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
python -m pip install -r requirements.txt -e ".[dev]"
33+
python -m pip install --pre tox-gh-actions
34+
- name: Test with pytest
35+
run: |
36+
# remove '.' in python-version and prepend with 'py' to get the correct tox env
37+
tox -e py$(echo ${{ matrix.python-version }} | sed 's/\.//g')
38+
39+
test-windows:
40+
runs-on: windows-latest
41+
2242
steps:
23-
- uses: actions/checkout@v3
24-
- name: Set up Python
25-
uses: actions/setup-python@v4
26-
with:
27-
python-version: ${{ matrix.python-version }}
28-
- name: Install dependencies
29-
run: |
30-
python -m pip install --upgrade pip
31-
python -m pip install -r requirements.txt -e ".[dev]"
32-
- name: Test with pytest
33-
run: |
34-
# remove '.' in python-version and prepend with 'py' to get the correct tox env
35-
tox -e py$(echo ${{ matrix.python-version }} | sed 's/\.//g')
43+
- uses: actions/checkout@v3
44+
- name: Set up Python
45+
uses: actions/setup-python@v4
46+
with:
47+
python-version: "3.7"
48+
- name: Install dependencies
49+
run: |
50+
python -m pip install --upgrade pip
51+
python -m pip install -r requirements.txt -e ".[dev]"
52+
python -m pip install --pre tox-gh-actions
53+
- name: Test with pytest
54+
run: tox
55+
env:
56+
PLATFORM: windows-latest

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def long_description():
1818
# check if README.md exists
1919
if not os.path.exists("README.md"):
2020
return ""
21-
with open("README.md", "r") as fh:
21+
with open("README.md", "r", encoding="utf-8") as fh:
2222
return fh.read()
2323

2424

0 commit comments

Comments
 (0)