From 8273483397e0994ce4b61284b0511e02a79dff62 Mon Sep 17 00:00:00 2001 From: Jason Kai Date: Tue, 26 Sep 2023 07:30:12 -0400 Subject: [PATCH 1/2] Update reusable workflows - Updates to the latest version of existing workflows - Makes use of composite action to setup Python environment --- .github/workflows/bump_version.yml | 4 +- .github/workflows/release.yml | 6 +-- .github/workflows/test.yml | 59 ++++-------------------------- 3 files changed, 13 insertions(+), 56 deletions(-) diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index 893430d3..d10280e5 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a443a705..c1297676 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index efe60b55..b66d5018 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 From dbf135285d2ec5b9b537f8088317a6a08d0b6817 Mon Sep 17 00:00:00 2001 From: Jason Kai Date: Tue, 26 Sep 2023 11:49:39 -0400 Subject: [PATCH 2/2] update all actions to v0.2.0 --- .github/workflows/assign_reviewers.yml | 2 +- .github/workflows/deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/assign_reviewers.yml b/.github/workflows/assign_reviewers.yml index b6c7aeca..7db5812b 100644 --- a/.github/workflows/assign_reviewers.yml +++ b/.github/workflows/assign_reviewers.yml @@ -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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4a219f7d..5348da89 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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: