Skip to content

Commit

Permalink
Merge pull request #33 from eshwen/esh-add-pipelines
Browse files Browse the repository at this point in the history
Add CI pipeline and pre-commit
  • Loading branch information
eshwen authored Sep 1, 2024
2 parents d41b939 + d21e332 commit ff399a4
Show file tree
Hide file tree
Showing 14 changed files with 249 additions and 11 deletions.
77 changes: 77 additions & 0 deletions .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'

categories:
- title: '🚨 Breaking Changes'
labels:
- 'breaking'
- 'major'
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
labels:
- 'documentation'
- 'testing'
- title: '⬆️ Dependencies'
collapse-after: 3
labels:
- 'dependencies'
- 'github_actions'

change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.

version-resolver:
major:
labels:
- 'major'
- 'breaking'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
- 'fix'
- 'bugfix'
- 'bug'
default: patch

autolabeler:
- label: 'documentation'
files:
- 'README.md'
- 'mkdocs.yml'
- 'docs/**'
branch:
- '/docs{0,1}\/.+/'
- label: 'bug'
branch:
- '/fix\/.+/'
title:
- '/fix/i'
- label: 'enhancement'
branch:
- '/feature\/.+/'
- label: 'github_actions'
files:
- '.github/workflows/*.yml'
- '.github/actions/**'
- label: 'dependencies'
files:
- 'poetry.lock'
- label: 'testing'
files:
- 'tests/**'

template: |
## Changes
$CHANGES
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
git fetch origin gh-pages --depth=1
git config user.name github-actions # Required for Mike
git config user.email [email protected]
poetry run mike deploy --update-aliases --push ${{ steps.version.outputs.major_without_prefix }}.${{ steps.version.outputs.minor }} latest
poetry run mike deploy --update-aliases --push ${{ steps.version.outputs.major_without_prefix }}.${{ steps.version.outputs.minor }} latest
29 changes: 29 additions & 0 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release Drafter

on:
push:
branches:
- main
# pull_request event is required only for autolabeler
pull_request:
types:
- opened
- reopened
- synchronize

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest

steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-config.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
exclude: |
(?x)^(
mkdocs.yml
)$
default_language_version:
python: python3.12

default_stages: [ pre-commit, pre-push,commit, push ]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: name-tests-test
args: [ --pytest-test-first ]
- id: trailing-whitespace


- repo: https://github.com/python-poetry/poetry
rev: '1.8.3'
hooks:
- id: poetry-check
- id: poetry-lock
args: [ --no-update ]
2 changes: 1 addition & 1 deletion docs/css/code_select.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.highlight .gp, .highlight .go { /* Generic.Prompt, Generic.Output */
user-select: none;
}
}
2 changes: 1 addition & 1 deletion docs/getting_started/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@

5. Strip out any unnecessary stuff from these new files

[GitHub Desktop]: https://desktop.github.com/
[GitHub Desktop]: https://desktop.github.com/
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--8<-- "README.md"
--8<-- "README.md"
2 changes: 1 addition & 1 deletion docs/programs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ Then copy that public key we generated earlier (in its entirety), and add it to

This should apply to GitHub Desktop as well, not just commits on the CLI. Just ensure you're using the same email address for your commits as entered when creating the key. Double check in Preferences :material-arrow-right: Git :material-arrow-right: Email.
[Ocean_Esh.terminal]: https://github.com/eshwen/macOS-setup/blob/main/Ocean_Esh.terminal
[Ocean_Esh.terminal]: https://github.com/eshwen/macOS-setup/blob/main/Ocean_Esh.terminal
2 changes: 1 addition & 1 deletion docs/programs/homebrew.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ brew install --cask qlvideo # for QLVideo (thumbnails for mkv and other file fo
brew install --cask raindropio
brew install --cask readdle-spark # For the Spark email client
brew install --cask runescape --appdir $games_dir
brew install --cask sidequest # For sideloading more VR content onto Oculus Quest
brew install --cask sidequest # For sideloading more VR content onto Oculus Quest
brew install --cask skype
brew install --cask steam --appdir $games_dir
brew install --cask todoist
Expand Down
2 changes: 1 addition & 1 deletion docs/programs/programs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Here you can find a list of programs that may be useful for Mac users. The list

There are some nice fonts I've found over the years in the [fonts] directory. To install them to the system's Font Book, just highlight them all in the Finder and double click.

[fonts]: https://github.com/eshwen/macOS-setup/tree/main/fonts
[fonts]: https://github.com/eshwen/macOS-setup/tree/main/fonts
2 changes: 1 addition & 1 deletion fonts/Source Sans Pro/OFL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
Expand Down
103 changes: 102 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ mkdocs-autorefs = "^1.1.0"
mkdocs-section-index = "^0.3.9"
termynal = "~0.11.1"
mike = "^2.1.3"
pre-commit = "^3.8.0"
4 changes: 2 additions & 2 deletions vscode_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
"--max-line-length=120",
"--ignore=E712,W503"
],

"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"--line-length 120"
],

"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
Expand Down

0 comments on commit ff399a4

Please sign in to comment.