Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2d9105c

Browse files
chore: add running unit tests on windows/macos
Add running the unit tests on windows-latest and macos-latest withPython 3.10.
1 parent3a7d6f6 commit2d9105c

File tree

2 files changed

+31
-14
lines changed

2 files changed

+31
-14
lines changed

‎.github/workflows/test.yml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,47 @@ env:
1414

1515
jobs:
1616
unit:
17-
runs-on:ubuntu-20.04
17+
runs-on:${{ matrix.os }}
1818
strategy:
1919
matrix:
20-
include:
21-
-python-version:3.7
20+
os:[ubuntu-latest]
21+
python:
22+
-version:3.7
2223
toxenv:py37
23-
-python-version:3.8
24+
-version:3.7
25+
toxenv:py37
26+
-version:3.8
2427
toxenv:py38
25-
-python-version:3.9
28+
-version:3.9
2629
toxenv:py39
27-
-python-version:"3.10"
28-
toxenv:py310
29-
-python-version:"3.10"
30-
toxenv:smoke
30+
-version:"3.10"
31+
toxenv:py310,smoke
32+
include:
33+
-os:macos-latest
34+
python:
35+
-version:"3.9"
36+
toxenv:py39,smoke
37+
-os:windows-latest
38+
python:
39+
-version:"3.10"
40+
toxenv:py310,smoke
3141
steps:
3242
-uses:actions/checkout@v2
33-
-name:Set up Python ${{ matrix.python-version }}
43+
-name:Set up Python ${{ matrix.python.version }}
3444
uses:actions/setup-python@v2
3545
with:
36-
python-version:${{ matrix.python-version }}
46+
python-version:${{ matrix.python.version }}
3747
-name:Install dependencies
38-
run:pip install tox pytest-github-actions-annotate-failures
48+
run:pip3 install tox pytest-github-actions-annotate-failures
3949
-name:Run tests
4050
env:
41-
TOXENV:${{ matrix.toxenv }}
42-
run:tox
51+
TOXENV:${{ matrix.python.toxenv }}
52+
run:|
53+
echo OS ${{ matrix.os }}
54+
echo python ${{ matrix.python }}
55+
echo python.version ${{ matrix.python.version }}
56+
echo python.toxenv ${{ matrix.python.toxenv }}
57+
tox
4358
4459
functional:
4560
runs-on:ubuntu-20.04

‎tests/unit/test_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
importio
1919
importos
20+
importsys
2021
fromtextwrapimportdedent
2122
fromunittestimportmock
2223

@@ -214,6 +215,7 @@ def test_valid_data(m_open, path_exists):
214215

215216
@mock.patch("os.path.exists")
216217
@mock.patch("builtins.open")
218+
@pytest.mark.skipif(sys.platform.startswith("win"),reason="Not supported on Windows")
217219
deftest_data_from_helper(m_open,path_exists,tmp_path):
218220
helper=tmp_path/"helper.sh"
219221
helper.write_text(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp