-
Notifications
You must be signed in to change notification settings - Fork 34
61 lines (59 loc) · 2.08 KB
/
pytest.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
60
61
name: Pytest
on:
push:
workflow_dispatch:
jobs:
run_test:
strategy:
matrix:
os: ["ubuntu-20.04"]
python-version: ["3.11"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update libs
run: sudo apt-get update
- name: Install memcached libs
run: sudo apt-get install ca-certificates libmemcached-tools
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache Poetry venv
uses: actions/cache@v3
with:
path: ./.venv
key: poetry-venv-${{ matrix.python-version }}${{ hashFiles('**/poetry.lock') }}
- name: Cache Poetry local
uses: actions/cache@v3
with:
path: ~/.local/share/pypoetry
key: poetry-local-${{ matrix.python-version }}${{ hashFiles('**/poetry.lock') }}
- name: Cache Poetry cache
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: poetry-cache-${{ matrix.python-version }}${{ hashFiles('**/poetry.lock') }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install dependencies
run: poetry install -v
- name: Show packages
run: poetry show --tree
- name: Create setting.py
run: mv setting_sample.py setting.py
- name: Run mypy
run: PYTHONPATH=./ poetry run mypy ./view/ ./module/ ./models/ ./celery_task/ ./structs/ ./api/ ./main.py
- name: Run Testing
env:
CLIENT_ID: ${{ secrets.TDX_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.TDX_CLIENT_SECRET }}
run: PYTHONPATH=./ poetry run pytest -vv --cov-report=term-missing --cov ./
- name: Run Pylint
run: PYTHONPATH=./ poetry run pylint --disable=R0801,E1101,E0611 ./view/ ./module/ ./models/ ./celery_task/ ./structs/ ./api/ ./main.py