|
| 1 | +name: tests |
| 2 | + |
| 3 | +on: [push] |
| 4 | + |
| 5 | +jobs: |
| 6 | + test: |
| 7 | + |
| 8 | + runs-on: ubuntu-16.04 |
| 9 | + strategy: |
| 10 | + max-parallel: 16 |
| 11 | + matrix: |
| 12 | + python-version: [3.5, 3.6, 3.7, 3.8] |
| 13 | + |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v1 |
| 16 | + |
| 17 | + - name: Set up Python ${{ matrix.python-version }} |
| 18 | + uses: actions/setup-python@v1 |
| 19 | + with: |
| 20 | + python-version: ${{ matrix.python-version }} |
| 21 | + |
| 22 | + - name: Prepare for installation |
| 23 | + run: | |
| 24 | + python3 -m pip install setuptools |
| 25 | + python3 -m pip install --upgrade pip wheel |
| 26 | + python3 -m pip install --upgrade codecov coveralls flake8 mock pytest==4.6.3 pytest-cov selenium |
| 27 | +
|
| 28 | + - name: Install |
| 29 | + run: | |
| 30 | + python3 -m pip install --upgrade -r requirements.txt |
| 31 | + python3 -m pip list |
| 32 | +
|
| 33 | + - name: Prepare for tests |
| 34 | + run: | |
| 35 | + openssl version -a |
| 36 | + echo 0 | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6 |
| 37 | +
|
| 38 | + - name: Test |
| 39 | + run: | |
| 40 | + catchsegv python3 -m pytest src/Test --cov=src --cov-config src/Test/coverage.ini |
| 41 | + export ZERONET_LOG_DIR="log/CryptMessage"; catchsegv python3 -m pytest -x plugins/CryptMessage/Test |
| 42 | + export ZERONET_LOG_DIR="log/Bigfile"; catchsegv python3 -m pytest -x plugins/Bigfile/Test |
| 43 | + export ZERONET_LOG_DIR="log/AnnounceLocal"; catchsegv python3 -m pytest -x plugins/AnnounceLocal/Test |
| 44 | + export ZERONET_LOG_DIR="log/OptionalManager"; catchsegv python3 -m pytest -x plugins/OptionalManager/Test |
| 45 | + export ZERONET_LOG_DIR="log/Multiuser"; mv plugins/disabled-Multiuser plugins/Multiuser && catchsegv python -m pytest -x plugins/Multiuser/Test |
| 46 | + export ZERONET_LOG_DIR="log/Bootstrapper"; mv plugins/disabled-Bootstrapper plugins/Bootstrapper && catchsegv python -m pytest -x plugins/Bootstrapper/Test |
| 47 | + 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]')" |
| 48 | + 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]')" |
| 49 | + flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics --exclude=src/lib/pyaes/ |
0 commit comments