42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: Proxy.py Library
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}-latest
|
|
name: Library - Python ${{ matrix.python }} on ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [macOS, ubuntu, windows]
|
|
python: [3.5, 3.6, 3.7, 3.8]
|
|
max-parallel: 4
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python }}-dev
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
pip install -r requirements-testing.txt
|
|
- name: Quality Check
|
|
run: |
|
|
flake8 --ignore=W504 --max-line-length=127 --max-complexity=19 proxy/ tests/ setup.py
|
|
mypy --strict --ignore-missing-imports proxy/ tests/ setup.py
|
|
- name: Run Tests
|
|
run: pytest --cov=proxy tests/
|
|
- name: Upload coverage to Codecov
|
|
env:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
run: codecov
|
|
- name: Integration testing
|
|
if: matrix.os != 'windows'
|
|
run: |
|
|
python setup.py install
|
|
proxy --hostname 127.0.0.1 --enable-web-server --pid-file proxy.pid --log-file proxy.log &
|
|
./tests/integration/main.sh
|