name: Test
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
black:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Black Check
|
|
uses: jpetrucciani/black-check@20.8b1
|
|
mypy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.9"
|
|
- run: pip install "poetry~=1.1.4"
|
|
- run: poetry config experimental.new-installer false
|
|
name: Disable new installer
|
|
- run: poetry install
|
|
- run: poetry run mypy --py2 sysaudit/ tests/
|
|
name: Mypy Check Python2
|
|
- run: poetry run mypy sysaudit/ tests/
|
|
name: Mypy Check Python3
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9"]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- run: pip install "poetry~=1.1.4"
|
|
- run: poetry config experimental.new-installer false
|
|
name: Disable new installer
|
|
- run: poetry check
|
|
- run: poetry install
|
|
- run: poetry run pytest tests/
|
|
|
|
docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.9"
|
|
- run: pip install "poetry~=1.1.4"
|
|
- run: poetry config experimental.new-installer false
|
|
name: Disable new installer
|
|
- run: poetry install
|
|
- run: poetry run sphinx-build -a -W -n -E docs/ docs/_build
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: docs
|
|
path: ./docs/_build/
|