зеркало из https://github.com/microsoft/torchgeo.git
reorganize CI tests
This commit is contained in:
Родитель
48cc3f36a3
Коммит
de88bb089b
|
@ -1,31 +0,0 @@
|
|||
name: black
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.py'
|
||||
- 'pyproject.toml'
|
||||
- '.github/workflows/black.yaml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.py'
|
||||
- 'pyproject.toml'
|
||||
- '.github/workflows/black.yaml'
|
||||
jobs:
|
||||
black:
|
||||
name: black
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install black
|
||||
run: pip install black
|
||||
- name: Run black checks
|
||||
run: black . --check --diff
|
|
@ -1,4 +1,4 @@
|
|||
name: sphinx
|
||||
name: docs
|
||||
on:
|
||||
push:
|
||||
branches:
|
|
@ -1,31 +0,0 @@
|
|||
name: flake8
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.py'
|
||||
- '.flake8'
|
||||
- '.github/workflows/flake8.yaml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.py'
|
||||
- '.flake8'
|
||||
- '.github/workflows/flake8.yaml'
|
||||
jobs:
|
||||
black:
|
||||
name: flake8
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install flake8
|
||||
run: pip install flake8
|
||||
- name: Run flake8 checks
|
||||
run: flake8
|
|
@ -1,31 +0,0 @@
|
|||
name: isort
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.py'
|
||||
- 'pyproject.toml'
|
||||
- '.github/workflows/isort.yaml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.py'
|
||||
- 'pyproject.toml'
|
||||
- '.github/workflows/isort.yaml'
|
||||
jobs:
|
||||
isort:
|
||||
name: isort
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install isort
|
||||
run: pip install isort[colors]>=4.3.5
|
||||
- name: Run isort checks
|
||||
run: isort . --check --diff
|
|
@ -1,36 +0,0 @@
|
|||
name: mypy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.py'
|
||||
- 'pyproject.toml'
|
||||
- 'requirements.txt'
|
||||
- '.github/workflows/mypy.yaml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.py'
|
||||
- 'pyproject.toml'
|
||||
- 'requirements.txt'
|
||||
- '.github/workflows/mypy.yaml'
|
||||
jobs:
|
||||
mypy:
|
||||
name: mypy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install cython numpy # needed for pycocotools
|
||||
pip install -r requirements.txt
|
||||
- name: Run mypy checks
|
||||
run: mypy .
|
|
@ -0,0 +1,61 @@
|
|||
name: style
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.py'
|
||||
- '.flake8'
|
||||
- 'pyproject.toml'
|
||||
- '.github/workflows/style.yaml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.py'
|
||||
- '.flake8'
|
||||
- 'pyproject.toml'
|
||||
- '.github/workflows/style.yaml'
|
||||
jobs:
|
||||
black:
|
||||
name: black
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install black
|
||||
run: pip install black
|
||||
- name: Run black checks
|
||||
run: black . --check --diff
|
||||
flake8:
|
||||
name: flake8
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install flake8
|
||||
run: pip install flake8
|
||||
- name: Run flake8 checks
|
||||
run: flake8
|
||||
isort:
|
||||
name: isort
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install isort
|
||||
run: pip install isort[colors]>=4.3.5
|
||||
- name: Run isort checks
|
||||
run: isort . --check --diff
|
|
@ -1,20 +1,39 @@
|
|||
name: pytest
|
||||
name: tests
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.py'
|
||||
- 'pyproject.toml'
|
||||
- 'requirements.txt'
|
||||
- '.github/workflows/pytest.yaml'
|
||||
- '.github/workflows/mypy.yaml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.py'
|
||||
- 'pyproject.toml'
|
||||
- 'requirements.txt'
|
||||
- '.github/workflows/pytest.yaml'
|
||||
- '.github/workflows/mypy.yaml'
|
||||
jobs:
|
||||
mypy:
|
||||
name: mypy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install cython numpy # needed for pycocotools
|
||||
pip install -r requirements.txt
|
||||
- name: Run mypy checks
|
||||
run: mypy .
|
||||
pytest:
|
||||
name: pytest
|
||||
runs-on: ${{ matrix.os }}
|
|
@ -2,12 +2,9 @@
|
|||
|
||||
datasets, transforms, and models for geospatial data
|
||||
|
||||
[![black](https://github.com/microsoft/torchgeo/actions/workflows/black.yaml/badge.svg)](https://github.com/microsoft/torchgeo/actions/workflows/black.yaml)
|
||||
[![flake8](https://github.com/microsoft/torchgeo/actions/workflows/flake8.yaml/badge.svg)](https://github.com/microsoft/torchgeo/actions/workflows/flake8.yaml)
|
||||
[![isort](https://github.com/microsoft/torchgeo/actions/workflows/isort.yaml/badge.svg)](https://github.com/microsoft/torchgeo/actions/workflows/isort.yaml)
|
||||
[![mypy](https://github.com/microsoft/torchgeo/actions/workflows/mypy.yaml/badge.svg)](https://github.com/microsoft/torchgeo/actions/workflows/mypy.yaml)
|
||||
[![pytest](https://github.com/microsoft/torchgeo/actions/workflows/pytest.yaml/badge.svg)](https://github.com/microsoft/torchgeo/actions/workflows/pytest.yaml)
|
||||
[![sphinx](https://github.com/microsoft/torchgeo/actions/workflows/sphinx.yaml/badge.svg)](https://github.com/microsoft/torchgeo/actions/workflows/sphinx.yaml)
|
||||
[![docs](https://github.com/microsoft/torchgeo/actions/workflows/docs.yaml/badge.svg)](https://github.com/microsoft/torchgeo/actions/workflows/docs.yaml)
|
||||
[![style](https://github.com/microsoft/torchgeo/actions/workflows/style.yaml/badge.svg)](https://github.com/microsoft/torchgeo/actions/workflows/style.yaml)
|
||||
[![tests](https://github.com/microsoft/torchgeo/actions/workflows/tests.yaml/badge.svg)](https://github.com/microsoft/torchgeo/actions/workflows/tests.yaml)
|
||||
|
||||
## Project setup
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ style =
|
|||
black
|
||||
flake8
|
||||
isort[colors]>=4.3.5
|
||||
mypy>=0.900
|
||||
tests =
|
||||
mypy>=0.900
|
||||
pytest>=6.0
|
||||
pytest-cov
|
||||
|
|
Загрузка…
Ссылка в новой задаче