Skip to content

Refactor custom heuristics #421

Refactor custom heuristics

Refactor custom heuristics #421

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
types: [opened, reopened, synchronize, ready_for_review, closed]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "linting"
linting:
name: Lint code
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Setup environment
uses: khanlab/actions/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Run ruff
run: poetry run ruff autobidsportal
- name: Run isort
run: poetry run isort --check autobidsportal
- name: Run black
run: poetry run black --check autobidsportal
- name: Run pyright
run: poetry run pyright autobidsportal
- name: run djLint
run: |
poetry run djlint --lint autobidsportal/templates
poetry run djlint --check autobidsportal/templates
test:
name: Set up environment and run tests
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
redis-version: [6]
steps:
- name: Setup environment
uses: khanlab/actions/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
install-library: true
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis-version }}
- name: Run pytest
shell: bash
run: |
poetry run pytest