add composite action to set up pyenv #54
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Lint and test workflow | |
on: | |
push: | |
branches: ["*", "!push-action/*"] | |
pull_request: | |
branches: ["*", "!push-action/*"] | |
jobs: | |
quality: | |
name: Lint code | |
if: github.event.pull_request.merged == false | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
- name: Setup Python environment | |
uses: khanlab/actions/.github/actions/action-setup_task-pyenv@enh/install-project | |
with: | |
python-version: "3.10" | |
reference: ${{ github.event.pull_request.id || github.event.after }} | |
- name: yamlfix | |
run: poetry run poe yamlfix-check | |
- name: isort | |
run: poetry run poe isort-check | |
- name: black | |
run: poetry run poe black-check | |
- name: ruff | |
run: poetry run poe ruff-check | |
- name: snakefmt | |
run: poetry run poe snakefmt-check | |
test: | |
runs-on: ubuntu-latest | |
needs: [quality] | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
- name: Setup Python environment | |
uses: khanlab/actions/.github/actions/action-setup_task-pyenv@enh/install-project | |
with: | |
python-version: ${{ matrix.python-version }} | |
reference: ${{ github.event.pull_request.id || github.event.after }} | |
run: poetry install --no-interaction --no-root --with dev | |
- name: Test minimum inputs | |
run: poetry run poe test_base | |
- name: Test freesurfer input | |
run: poetry run poe test_freesurfer | |
- name: Test responsemean input | |
run: poetry run poe test_responsemean | |
- name: Test dwi input | |
run: poetry run poe test_dwi | |
- name: Test custom labelmerge inputs | |
run: poetry run poe test_labelmerge | |
- name: Test using single atlas (skipping labelmerge) | |
run: poetry run poe test_skip_labelmerge | |
- name: Test sessions | |
run: poetry run poe test_sessions |