Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update reusable workflows #89

Merged
merged 2 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ on:
jobs:
bump-version:
if: github.event.pull_request.merged == true
uses: khanlab/actions/.github/workflows/workflow-version_task-semverGithub.yml@v0.1.0
uses: khanlab/actions/.github/workflows/workflow-version_task-semverGithub.yml@v0.2.0
secrets:
BP_PAT: ${{ secrets.BP_PAT_TOKEN }}
BP-PAT: ${{ secrets.BP_PAT_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
required: false
jobs:
release_package:
uses: khanlab/actions/.github/workflows/workflow-release_task-publishGithub.yml@v0.1.0
uses: khanlab/actions/.github/workflows/workflow-release_task-publishGithub.yml@v0.2.0
with:
comments: ${{ github.event.inputs.comments }}
pipeline_description: true
pipeline-description: true
secrets:
BP_PAT: ${{ secrets.BP_PAT_TOKEN }}
BP-PAT: ${{ secrets.BP_PAT_TOKEN }}
59 changes: 8 additions & 51 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,19 @@
name: Lint and test workflow
on:
push:
branches: ['*', '!push-action/*']
branches: ["*", "!push-action/*"]
pull_request:
branches: ['*', '!push-action/*']
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@master
- name: Setup Python 3.10
uses: actions/setup-python@v4
- name: Setup Python environment
uses: khanlab/actions/.github/actions/action-setup_task-installPyProject@v0.2.0
with:
python-version: '3.10'
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-3.10
restore-keys: ${{ runner.os }}-pip-3.10
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-3.10
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with dev
python-version: "3.10"
- name: yamlfix
run: poetry run poe yamlfix-check
- name: isort
Expand All @@ -51,34 +30,12 @@ jobs:
needs: [quality]
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Clone repo
uses: actions/checkout@master
- name: Select Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Setup Python environments
uses: khanlab/actions/.github/actions/action-setup_task-installPyProject@v0.2.0
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: ${{ runner.os }}-pip-${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version
}}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with dev
- name: Test minimum inputs
run: poetry run poe test_base
- name: Test freesurfer input
Expand Down