generated from ImperialCollegeLondon/poetry_template_2
-
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 #4 from alexdewar/precommit_ci
Precommit CI
- Loading branch information
Showing
7 changed files
with
42 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
{ | ||
"project_name": "My Project", | ||
"project_slug": "{{ cookiecutter.project_name.lower().replace(' ', '_') }}", | ||
"project_description": "", | ||
"project_description": "[Description for project.]", | ||
"author": "Jane Doe", | ||
"author_email": "[email protected]", | ||
"use_bsd3_licence": false, | ||
"add_precommit_workflows": true, | ||
"_copy_without_render": [".github"], | ||
"__prompts__": { | ||
"project_name": "Enter a human-readable name for the project", | ||
"project_slug": "Enter a name for the Python package", | ||
"project_description": "Enter a brief description of the project", | ||
"author": "Enter your full name", | ||
"author_email": "Enter your email address", | ||
"use_bsd3_licence": "Whether to use Imperial's default open-source licence (BSD 3-clause)" | ||
"use_bsd3_licence": "Whether to use Imperial's default open-source licence (BSD 3-clause)", | ||
"add_precommit_workflows": "Add Github Actions to run pre-commit hooks (only needed for private repositories)" | ||
} | ||
} |
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,26 +1,13 @@ | ||
name: Test and build | ||
|
||
on: [push, pull_request, workflow_call] | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
qa: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pre-commit/[email protected] | ||
|
||
check-links: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
name: Check links in markdown files | ||
with: | ||
use-quiet-mode: "yes" | ||
use-verbose-mode: "yes" | ||
|
||
test: | ||
needs: qa | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
|
15 changes: 15 additions & 0 deletions
15
{{ cookiecutter.project_slug }}/.github/workflows/pre-commit.yml
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,15 @@ | ||
name: Run pre-commit hooks | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pre-commit/[email protected] | ||
- uses: pre-commit-ci/[email protected] | ||
if: always() |