-
Notifications
You must be signed in to change notification settings - Fork 13
39 lines (39 loc) · 1.46 KB
/
checks.yml
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
name: checks
'on':
- push
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install poetry
run: python -m pip install --upgrade poetry
- id: cache-poetry
uses: actions/cache@v1
with:
path: ~/.cache/pypoetry/virtualenvs
key: '${{ runner.os }}-poetry-v2-${{ hashFiles(''**/poetry.lock'') }}'
- name: Install dependencies
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: cp .github/pyproject.toml .; rm poetry.lock; poetry run pip install --upgrade pip; poetry install
- name: List dependency versions (check this if you get confusing results)
run: poetry show --tree
# - name: Setup tmate session # this lets you SSH into the container
# uses: mxschmitt/action-tmate@v3
- name: Black
run: poetry run black . --check
if: always()
- name: Mypy
run: poetry run mypy sample_bots mc_util forest mobfriend contact imogen hotline teddy
if: always()
- name: Pylint
run: poetry run pylint --version; poetry run pylint sample_bots mc_util forest mobfriend/mobfriend.py contact imogen/imogen.py hotline/hotline.py teddy/teddy.py teddy/charity.py
if: always()
- name: Pytest
run: poetry run python -m pytest --cov forest