Skip to content

Commit 3aea86e

Browse files
committed
Add GitHub Actions workflow
1 parent a1c176b commit 3aea86e

File tree

1 file changed

+44
-2
lines changed

1 file changed

+44
-2
lines changed

.github/workflows/tests.yml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: tests
33
on: [push]
44

55
jobs:
6-
test:
7-
6+
test-linux:
87
runs-on: ubuntu-16.04
98
strategy:
109
max-parallel: 16
@@ -47,3 +46,46 @@ jobs:
4746
find src -name "*.json" | xargs -n 1 python3 -c "import json, sys; print(sys.argv[1], end=' '); json.load(open(sys.argv[1])); print('[OK]')"
4847
find plugins -name "*.json" | xargs -n 1 python3 -c "import json, sys; print(sys.argv[1], end=' '); json.load(open(sys.argv[1])); print('[OK]')"
4948
flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics --exclude=src/lib/pyaes/
49+
50+
test-windows:
51+
runs-on: windows-latest
52+
strategy:
53+
max-parallel: 16
54+
matrix:
55+
python-version: [3.5, 3.6, 3.7, 3.8]
56+
57+
steps:
58+
- uses: actions/checkout@v1
59+
60+
- name: Set up Python ${{ matrix.python-version }}
61+
uses: actions/setup-python@v1
62+
with:
63+
python-version: ${{ matrix.python-version }}
64+
65+
- name: Prepare for installation
66+
run: |
67+
python -m pip install setuptools
68+
python -m pip install --upgrade pip wheel
69+
python -m pip install --upgrade codecov coveralls flake8 mock pytest==4.6.3 pytest-cov selenium
70+
71+
- name: Install
72+
run: |
73+
python -m pip install --upgrade -r requirements.txt
74+
python -m pip list
75+
76+
- name: Prepare for tests
77+
run: |
78+
openssl version -a
79+
80+
- name: Test
81+
run: |
82+
python -m pytest src/Test --cov=src --cov-config src/Test/coverage.ini
83+
$env:ZERONET_LOG_DIR="log/CryptMessage"; python -m pytest -x plugins/CryptMessage/Test
84+
$env:ZERONET_LOG_DIR="log/Bigfile"; python -m pytest -x plugins/Bigfile/Test
85+
$env:ZERONET_LOG_DIR="log/AnnounceLocal"; python -m pytest -x plugins/AnnounceLocal/Test
86+
$env:ZERONET_LOG_DIR="log/OptionalManager"; python -m pytest -x plugins/OptionalManager/Test
87+
$env:ZERONET_LOG_DIR="log/Multiuser"; mv plugins/disabled-Multiuser plugins/Multiuser; python -m pytest -x plugins/Multiuser/Test
88+
$env:ZERONET_LOG_DIR="log/Bootstrapper"; mv plugins/disabled-Bootstrapper plugins/Bootstrapper; python -m pytest -x plugins/Bootstrapper/Test
89+
find src -name "*.json" | xargs -n 1 python -c "import json, sys; print(sys.argv[1], end=' '); json.load(open(sys.argv[1])); print('[OK]')"
90+
find plugins -name "*.json" | xargs -n 1 python -c "import json, sys; print(sys.argv[1], end=' '); json.load(open(sys.argv[1])); print('[OK]')"
91+
flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics --exclude=src/lib/pyaes/

0 commit comments

Comments
 (0)