Spaces:
Running
Running
Yurii Paniv
commited on
Commit
•
1f86f8a
1
Parent(s):
dd57a7c
Add tests for Windows (#17)
Browse files- .github/workflows/hf-sync.yml +21 -2
- requirements-test.txt +0 -2
.github/workflows/hf-sync.yml
CHANGED
@@ -7,6 +7,22 @@ on:
|
|
7 |
workflow_dispatch:
|
8 |
|
9 |
jobs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
build:
|
11 |
name: Run pytest and checks
|
12 |
runs-on: ubuntu-latest
|
@@ -25,7 +41,6 @@ jobs:
|
|
25 |
- name: Install dependencies
|
26 |
run: |
|
27 |
python -m pip install --upgrade pip
|
28 |
-
pip install pytest
|
29 |
pip install -r requirements-test.txt
|
30 |
- name: Check code with black
|
31 |
run: |
|
@@ -36,12 +51,16 @@ jobs:
|
|
36 |
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
37 |
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
38 |
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
|
|
|
|
|
|
|
39 |
- name: Test with pytest
|
40 |
run: |
|
41 |
pytest
|
42 |
sync-to-hub:
|
43 |
runs-on: ubuntu-latest
|
44 |
-
needs: build
|
45 |
steps:
|
46 |
- uses: actions/checkout@v2
|
47 |
with:
|
|
|
7 |
workflow_dispatch:
|
8 |
|
9 |
jobs:
|
10 |
+
windows:
|
11 |
+
name: Run pytest on Windows
|
12 |
+
runs-on: windows-latest
|
13 |
+
steps:
|
14 |
+
- uses: actions/checkout@v1
|
15 |
+
- uses: actions/setup-python@v1
|
16 |
+
with:
|
17 |
+
python-version: '3.9'
|
18 |
+
- name: Test windows-latest binding
|
19 |
+
run: |
|
20 |
+
python -m venv venv3
|
21 |
+
venv3\Scripts\Activate.ps1
|
22 |
+
python -m pip install .
|
23 |
+
python -m pip install -r requirements-test.txt
|
24 |
+
python -m pytest
|
25 |
+
|
26 |
build:
|
27 |
name: Run pytest and checks
|
28 |
runs-on: ubuntu-latest
|
|
|
41 |
- name: Install dependencies
|
42 |
run: |
|
43 |
python -m pip install --upgrade pip
|
|
|
44 |
pip install -r requirements-test.txt
|
45 |
- name: Check code with black
|
46 |
run: |
|
|
|
51 |
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
52 |
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
53 |
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
54 |
+
- name: Install dependencies
|
55 |
+
run: |
|
56 |
+
python -m pip install --upgrade pip
|
57 |
+
pip install -r requirements.txt
|
58 |
- name: Test with pytest
|
59 |
run: |
|
60 |
pytest
|
61 |
sync-to-hub:
|
62 |
runs-on: ubuntu-latest
|
63 |
+
needs: [build,windows]
|
64 |
steps:
|
65 |
- uses: actions/checkout@v2
|
66 |
with:
|
requirements-test.txt
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
-r requirements.txt
|
2 |
-
|
3 |
pytest==7.2.0
|
4 |
pytest-cov==4.0.0
|
5 |
black
|
|
|
|
|
|
|
1 |
pytest==7.2.0
|
2 |
pytest-cov==4.0.0
|
3 |
black
|