-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (43 loc) · 1.41 KB
/
ci.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI
on:
push:
pull_request:
types: [opened]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: install poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: configure poetry
run: poetry config virtualenvs.in-project true
- name: load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('**/pyproject.toml') }}
- name: install dependencies
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --all-extras
- name: auto-flake
run: poetry run autoflake --remove-all-unused-imports --expand-star-imports --ignore-init-module-imports --in-place --recursive aioq3rcon/ examples/
- name: black fix
run: poetry run black .
- name: isort fix
run: poetry run isort .
- name: auto commit
uses: stefanzweifel/git-auto-commit-action@v4.14.1
with:
commit_message: format / fix code
- name: flake8
run: poetry run flake8
- name: mypy
run: poetry run mypy
# - name: pytest
# run: poetry run pytest