-
Notifications
You must be signed in to change notification settings - Fork 4
75 lines (59 loc) · 1.86 KB
/
tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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