diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..1619d91 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,68 @@ +name: Tests + +on: + push: + branches: + - master + pull_request: ~ + +jobs: + tests: + name: Python ${{ matrix.python-version }} + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + + steps: + - uses: actions/checkout@master + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: pip install pytest requests + + - name: Tests + run: pytest + + docs: + name: Build docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + pip install sphinx sphinx_rtd_theme + pip install . + + - name: Build docs + run: | + cd docs + sphinx-build -qb html -d /tmp/doctrees . /tmp/html + + coverage: + name: Coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" + + - name: Install dependencies + run: pip install pytest pytest-cov coveralls + + - name: Test + run: pytest -qq --cov=fritzconnection --cov-report=term-missing