-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (42 loc) · 1.15 KB
/
codetools.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
name: ci
on: [push, pull_request]
env:
PACKAGE: virtual_ship
TESTS: tests
jobs:
codetools:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: install
run: pip install ".[dev]"
- name: flake8
run: flake8 ./$PACKAGE ./$TESTS
- name: pydocstyle
run: pydocstyle ./$PACKAGE
- name: sort-all
run: |
find ./$PACKAGE -type f -name '__init__.py' -print0 | xargs -0 sort-all
[[ -z $(git status -s) ]]
git checkout -- .
- name: black
run: black --diff --check ./$PACKAGE ./$TESTS
- name: isort
run: isort --check-only --diff ./$PACKAGE ./$TESTS
tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
python-version: 3.12
- name: install
run: pip install ".[dev]"
- name: run_tests
run: pytest --cov=virtual_ship tests