Skip to content

Commit

Permalink
Merge pull request #89 from kaitj/maint/actions
Browse files Browse the repository at this point in the history
Update reusable workflows
  • Loading branch information
kaitj authored Sep 26, 2023
2 parents f1c9e5d + dbf1352 commit e814921
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/assign_reviewers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ on:
types: [opened, ready_for_review]
jobs:
assign-reviewer:
uses: khanlab/actions/.github/workflows/workflow-pr_task-assignReviewer.yml@v0.1.0
uses: khanlab/actions/.github/workflows/workflow-pr_task-assignReviewer.yml@v0.2.0
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 }}
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
tags: [v*]
jobs:
deploy_docker:
uses: khanlab/actions/.github/workflows/workflow-release_task-deployDocker.yml@v0.1.1
uses: khanlab/actions/.github/workflows/workflow-release_task-deployDocker.yml@v0.2.0
with:
maximize_space: true
secrets:
Expand Down
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

0 comments on commit e814921

Please sign in to comment.