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 CI #88

Merged
merged 6 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 6 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ updates:
schedule:
interval: daily
labels:
- chore
- dependencies
- auto
- no-stale
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: weekly
labels:
- chore
- dependencies
- auto
- no-stale
5 changes: 4 additions & 1 deletion .github/labels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
- name: "auto"
color: bfdadc
description: "Marks a PR or issue that has been created automatically."
- name: "breaking-change"
color: ee0701
description: "A breaking change for existing users."
Expand Down Expand Up @@ -38,7 +41,7 @@
description: "There has not been activity on this issue or PR for quite some time."
- name: "no-stale"
color: fef2c0
description: "This issue or PR is exempted from the stable bot."
description: "This issue or PR is exempted from the stale bot."

- name: "security"
color: ee0701
Expand Down
58 changes: 37 additions & 21 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,54 @@
---
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.

categories:
- title: '🚀 Features'
- title: '🚨 Breaking changes'
labels:
- 'enhancement'
- 'refactor'
- 'breaking-change'
- title: '✨ New features'
labels:
- 'new-feature'
- title: '🐛 Bug Fixes'
labels:
- 'bug'
- 'bugfix'
- title: '🚀 Enhancements'
labels:
- 'enhancement'
- 'refactor'
- 'performance'
- title: '🧰 Maintenance'
label: 'chore'
template: |
## Changes
labels:
- 'maintenance'
- 'ci'
- title: '📚 Documentation'
labels:
- 'documentation'
- title: '⬆️ Dependency updates'
labels:
- 'dependencies'

$CHANGES
version-resolver:
major:
labels:
- 'breaking change'
- 'major'
- 'breaking-change'
minor:
labels:
- 'minor'
- 'new-feature'
patch:
labels:
- 'bugfix'
- 'dependencies'
- 'enhancement'
- 'performance'
- 'refactor'
default: patch
autolabeler:
- label: 'bug'
branch:
- '/fix\/.+/'
title:
- '/fix/i'
- label: 'enhancement'
branch:
- '/feature\/.+/'
- label: 'chore'
branch:
- '/chore\/.+/'

template: |
## Changes

$CHANGES
20 changes: 20 additions & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Lock

on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:

jobs:
lock:
name: 🔒 Lock closed issues and PRs
runs-on: ubuntu-latest
steps:
- uses: dessant/[email protected]
with:
github-token: ${{ github.token }}
issue-inactive-days: "30"
issue-lock-reason: ""
pr-inactive-days: "1"
pr-lock-reason: ""
19 changes: 12 additions & 7 deletions .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,28 @@
name: PR Labels

on:
pull_request:
pull_request_target:
types:
- opened
- synchronize
- labeled
- unlabeled
branches:
- master

permissions: {}
workflow_call:

jobs:
pr_labels:
pr-labels:
name: Verify
runs-on: ubuntu-latest
steps:
- name: 🏷 Verify valid PR label
uses: ludeeus/[email protected]
with:
labels: >-
breaking-change, bugfix, chore, dependencies, documentation, enhancement, new-feature, refactor
breaking-change, bugfix,
ci,
dependencies, documentation,
enhancement,
maintenance,
new-feature,
performance,
refactor
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
body: |
Update versions of tools in pre-commit
configs to latest version
labels: dependencies
labels: dependencies, auto, no-stale
10 changes: 6 additions & 4 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# Utilize release drafter action

---
name: Release Drafter

on:
push:
branches:
- master
workflow_dispatch:


jobs:
update_release_draft:
name: 📝 Draft release
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/[email protected]
- name: 🚀 Run Release Drafter
uses: release-drafter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Stale

on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:

jobs:
stale:
name: 🧹 Clean up stale issues and PRs
runs-on: ubuntu-latest
steps:
- name: 🚀 Run stale
uses: actions/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 14
days-before-close: 7
remove-stale-when-updated: true
stale-issue-label: "stale"
exempt-issue-labels: "no-stale,help-wanted"
stale-issue-message: >
There hasn't been any activity on this issue recently, so we
clean up some of the older and inactive issues.

Please make sure to update to the latest version and
check if that solves the issue. Let us know if that works for you
by leaving a comment 👍

This issue has now been marked as stale and will be closed if no
further activity occurs. Thanks!
stale-pr-label: "stale"
exempt-pr-labels: "no-stale"
stale-pr-message: >
There hasn't been any activity on this pull request recently. This
pull request has been automatically marked as stale because of that
and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.
15 changes: 14 additions & 1 deletion .github/workflows/typing-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,17 @@ jobs:
- name: 🚧 Install dependencies
run: pip install . .[test]
- name: 🚀 Run pre-commit hooks
run: pre-commit run --all --all-files
run: |
pre-commit run check-yaml --all-files
pre-commit run check-toml --all-files
pre-commit run check-ast --all-files
pre-commit run check-docstring-first --all-files
pre-commit run debug-statements --all-files
pre-commit run end-of-file-fixer --all-files
pre-commit run trailing-whitespace --all-files
pre-commit run ruff --all-files
pre-commit run ruff-format --all-files
pre-commit run black --all-files
pre-commit run codespell --all-files
pre-commit run mypy --all-files
pre-commit run pylint --all-files
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ repos:
name: ⮐ Trailing whitespace
- id: no-commit-to-branch
name: 🛑 No commit to master branch
args:
- --branch=master
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.2.1
hooks:
Expand Down