-
Notifications
You must be signed in to change notification settings - Fork 19
31 lines (29 loc) · 985 Bytes
/
test.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
name: test
on: pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Poetry
uses: snok/[email protected]
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
- name: Run linter
run: |
poetry run black --check --diff .
- name: Run tests
run: |
poetry run pytest --cov=accloudtant --cov-report term-missing:skip-covered
- name: Run complexity analysis
run: |
test $(poetry run radon cc --md -nb accloudtant/ | grep -E "\| [A-F] \|$" | wc -l) -eq 0 \
|| poetry run radon cc --md -nb accloudtant/