forked from TencentBlueKing/bk-user
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.03 KB
/
python-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
name: Python CI Check
on:
push:
branches: [ master, develop, pre_*, ft_* ]
pull_request:
branches: [ master, develop, pre_*, ft_* ]
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: [3.6.14]
poetry-version: [1.1.7]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry==${{ matrix.poetry-version }}
- name: Export requirements.txt
run: poetry export -f requirements.txt --dev --without-hashes -o requirements.txt --no-ansi
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install dependencies
run: pip install -r requirements.txt -i https://pypi.org/simple/
- name: Lint with flake8
run: pflake8 src/ --config=pyproject.toml
- name: Lint with mypy
run: mypy src/ --config-file=pyproject.toml