-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from kaitj/maint/repo_updates
Dependency and repo organization updates
- Loading branch information
Showing
14 changed files
with
368 additions
and
672 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
--- | ||
name: Assign reviewer | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, ready_for_review] | ||
|
||
jobs: | ||
assign: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.assignee == null | ||
|
||
steps: | ||
- name: Assign reviewer | ||
uses: kentaro-m/auto-assign-action@v1.2.5 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
assign-reviewer: | ||
uses: khanlab/actions/.github/workflows/workflow-pr_task-assignReviewer.yml@v0.2.1 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Deploy packages | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: [v*] | ||
jobs: | ||
deploy-docker: | ||
uses: khanlab/actions/.github/workflows/workflow-release_task-deployDocker.yml@v0.2.1 | ||
secrets: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
deploy-pypi: | ||
uses: khanlab/actions/.github/workflows/workflow-release_task-deployPypi.yml@v0.2.1 | ||
secrets: | ||
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,27 @@ | ||
--- | ||
name: Lint workflow | ||
|
||
name: Lint and format 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@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.1 | ||
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: | ||
version: 1.4.2 | ||
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 | ||
|
||
- name: yamlfix | ||
run: poetry run poe yamlfix-check | ||
|
||
- name: ruff | ||
run: poetry run poe ruff-check | ||
- name: isort | ||
run: poetry run poe isort-check | ||
|
||
- name: black | ||
run: poetry run poe black-check | ||
|
||
- name: flake8 | ||
run: poetry run poe flake8 | ||
|
||
- name: snakefmt | ||
run: poetry run poe snakefmt-check |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,114 +1,16 @@ | ||
--- | ||
name: Release package | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
comments: | ||
description: Comments | ||
required: false | ||
|
||
jobs: | ||
release_changelog: | ||
name: Release changelog | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Print author | ||
run: | | ||
echo "Author: ${{ github.triggering_actor }}" | ||
echo "Comments: ${{ github.event.inputs.comments }}" | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
|
||
- uses: actions/checkout@master | ||
with: | ||
ref: ${{ steps.extract_branch.outputs.branch }} | ||
|
||
- name: Draft change log | ||
uses: release-drafter/release-drafter@v5 | ||
id: release-drafter | ||
with: | ||
commitish: ${{ steps.extract_branch.outputs.branch }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set new release version | ||
env: | ||
RD_RELEASE: ${{ steps.release-drafter.outputs.name }} | ||
run: | | ||
if [ ! -z "$RD_RELEASE" ]; then | ||
echo "NEW_RELEASE=$RD_RELEASE" >> $GITHUB_ENV | ||
else | ||
echo "NEW_RELEASE=0.1.0" >> $GITHUB_ENV | ||
fi | ||
- name: Update pipeline description | ||
uses: jacobtomlinson/gha-find-replace@master | ||
with: | ||
include: 'scattr/pipeline_description.json' | ||
find: '"Version": "(?:([0-9]+\.[0-9]+\.[0-9]+.+)|([0-9]+\.[0-9]+\.[0-9]+))"' | ||
replace: '"Version": "${{ env.NEW_RELEASE }}"' | ||
|
||
- name: Update version in pyproject.toml | ||
uses: jacobtomlinson/gha-find-replace@master | ||
with: | ||
include: pyproject.toml | ||
find: version = "(?:([0-9]+\.[0-9]+\.[0-9]+.+)|([0-9]+\.[0-9]+\.[0-9]+))" | ||
replace: version = "${{ env.NEW_RELEASE }}" | ||
|
||
- name: Commit updates | ||
env: | ||
LATEST_VERSION: ${{ env.NEW_RELEASE }} | ||
run: | | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git diff-index --quiet HEAD || git commit -m "Bump version to $LATEST_VERSION" -a | ||
- name: Push changes | ||
uses: CasperWA/push-protected@v2 | ||
with: | ||
token: ${{ secrets.BP_PAT_TOKEN }} | ||
unprotect_reviews: true | ||
|
||
- name: Publish change log | ||
uses: release-drafter/release-drafter@v5 | ||
with: | ||
commitish: ${{ steps.extract_branch.outputs.branch }} | ||
publish: true | ||
name: ${{ env.NEW_RELEASE }} | ||
tag: v${{ env.NEW_RELEASE }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BP_PAT_TOKEN }} | ||
|
||
# deploy_pypi: | ||
# name: PyPI Deploy | ||
# runs-on: ubuntu-latest | ||
# needs: [release_changelog] | ||
|
||
# steps: | ||
# - uses: actions/checkout@master | ||
# with: | ||
# ref: ${{ steps.extract_branch.outputs.branch }} | ||
|
||
# - name: Set up Python | ||
# uses: actions/setup-python@v4.3.1 | ||
# with: | ||
# python-version: '3.9' | ||
|
||
# #---------------------------------------------- | ||
# # ----- install & configure poetry ----- | ||
# #---------------------------------------------- | ||
# - name: Install Poetry | ||
# uses: snok/install-poetry@v1 | ||
# with: | ||
# virtualenvs-create: true | ||
# virtualenvs-in-project: true | ||
|
||
# - name: Build and publish | ||
# env: | ||
# POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }} | ||
# run: | | ||
# poetry publish --build | ||
release_package: | ||
uses: khanlab/actions/.github/workflows/workflow-release_task-publishGithub.yml@v0.2.1 | ||
with: | ||
comments: ${{ github.event.inputs.comments }} | ||
pipeline-description: true | ||
secrets: | ||
BP-PAT: ${{ secrets.BP_PAT_TOKEN }} |
Oops, something went wrong.