-
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.
- Loading branch information
Showing
5 changed files
with
115 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
name: Run Lint | ||
description: Run linters to verify code quality. Credits to Andre Sionek for writing the original GitHub Action. | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Lint | ||
shell: bash | ||
run: poetry run pre-commit run --all-files |
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,42 @@ | ||
--- | ||
name: Set Up Poetry Environment | ||
description: Install Python and Poetry. Credits to Andre Sionek for writing the original GitHub Action. | ||
|
||
inputs: | ||
python_version: | ||
description: Python version | ||
required: true | ||
default: '3.11.5' | ||
type: string | ||
|
||
poetry_version: | ||
description: Poetry version | ||
required: true | ||
default: 1.5.1 | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python_version }} | ||
|
||
- name: Install and configure Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
version: ${{ inputs.poetry_version }} | ||
|
||
- name: Set up Poetry cache | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python_version }} | ||
cache: poetry | ||
|
||
- name: Install Python Dependencies with Poetry | ||
shell: bash | ||
run: poetry install |
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,31 @@ | ||
--- | ||
name: Status Checks | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
# Stops the currently running workflow if a new one has been triggered | ||
concurrency: | ||
group: "${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up | ||
uses: ./.github/actions/poetry/setup | ||
with: | ||
python_version: "3.11.5" | ||
|
||
- name: Install Python Lint Dependencies with Poetry | ||
shell: bash | ||
run: poetry install --with lint | ||
|
||
- name: Lint | ||
uses: ./.github/actions/poetry/pre-commit-lint |
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,31 @@ | ||
--- | ||
extends: default | ||
|
||
rules: | ||
braces: | ||
level: error | ||
max-spaces-inside: 1 | ||
brackets: | ||
level: error | ||
max-spaces-inside: 1 | ||
colons: | ||
level: error | ||
commas: | ||
level: error | ||
empty-lines: | ||
level: error | ||
hyphens: | ||
level: error | ||
document-start: disable | ||
indentation: | ||
level: error | ||
indent-sequences: consistent | ||
new-lines: | ||
level: warning | ||
trailing-spaces: | ||
level: warning | ||
line-length: | ||
max: 159 | ||
level: error | ||
allow-non-breakable-inline-mappings: true | ||
truthy: disable |