Skip to content

Commit

Permalink
split format testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Aug 22, 2023
1 parent 9e235e0 commit 68950b6
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# Documentation
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
6 changes: 0 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install neurodocker
run: python -m pip install --editable .[dev]
- name: Check types
run: mypy --install-types --non-interactive neurodocker
- name: Check style
run: flake8 neurodocker
- name: Check black formatting
run: black --check neurodocker
- name: Run python tests
run: pytest --numprocesses auto
- name: Get code coverage
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: linters, formatters and type checking

on:
pull_request:
branches: [ master ]

jobs:
format:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2

- name: Install neurodocker
run: python -m pip install --editable .[dev]

- name: Check style
run: flake8 neurodocker

- name: Check black formatting
run: black --check neurodocker

- name: Run isort
run: isort --diff --check .

typecheck:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.11', '3.10', '3.9', '3.8']

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install neurodocker
run: python -m pip install --editable .[dev]

- name: Check types
run: mypy --install-types --non-interactive neurodocker
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ minify =
dev =
%(minify)s
black >= 23.1.0
isort
codecov
flake8
mypy
Expand Down

0 comments on commit 68950b6

Please sign in to comment.