-
Notifications
You must be signed in to change notification settings - Fork 13
46 lines (43 loc) · 1.4 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: cliboa-test
on: [pull_request]
jobs:
test_by_multiple_python_versions:
runs-on: ubuntu-latest
strategy:
matrix:
python_versions: [3.7, 3.8, 3.9, '3.10']
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_versions }}
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
py_version=${{ matrix.python_versions }}
pyproject_toml_version=${py_version//./}
cp cliboa/template/pyproject.above"$pyproject_toml_version".toml pyproject.toml
poetry env use ${pyproject_toml_version}
poetry install
- name: execute flake8
run: |
poetry run flake8 .
- name: check black format
run: |
poetry run black --check .
- name: check isort
run: |
poetry run isort --check
- name: execute unittest and instrument coverage
run: |
poetry run pytest --cov cliboa --cov-report term-missing --cov-report=xml
- name: check layer dependency
run: |
if [ ${{ matrix.python_versions }} = 3.6 ]; then
echo "import-linter does not support python${{ matrix.python_versions }}"
else
cd cliboa
poetry run lint-imports
fi