fixed ci #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
run-linters: | |
name: Run linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.x' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
# install poetry | |
curl -sSL https://install.python-poetry.org | python3 - | |
poetry config virtualenvs.create false | |
# install deps | |
poetry install --with "dev, test" --all-extras | |
- name: bandit | |
run: make bandit | |
- name: Lint build | |
run: | | |
cat README.rst > README_BUILD.rst && echo >> README_BUILD.rst && cat HISTORY.rst >> README_BUILD.rst | |
poetry build | |
poetry run python -m twine check --strict dist/* | |
- name: flake8 | |
run: poetry run flake8 aiohttp_admin2 --exclude views/aiohttp/templates | |
run-tests: | |
name: Run pytest | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.x' | |
- name: Install Python dependencies | |
run: | | |
cat README.rst > README_BUILD.rst && echo >> README_BUILD.rst && cat HISTORY.rst >> README_BUILD.rst | |
python -m pip install --upgrade pip | |
# install poetry | |
curl -sSL https://install.python-poetry.org | python3 - | |
# install deps | |
poetry install --with "dev, test" --all-extras | |
- name: Pytest | |
run: | | |
poetry run pytest --slow -v -s -p no:warnings |