-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: added general and pre-commit github workflow
- Loading branch information
1 parent
5cae23f
commit 4648fa8
Showing
3 changed files
with
53 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Pre-Commit | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
description: The reference to build | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
linter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10.11" | ||
|
||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] | ||
|
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,20 @@ | ||
name: Pull request main | ||
|
||
on: | ||
pull_request_target: | ||
branches: [main] | ||
paths-ignore: [ "docs/**" ] | ||
|
||
jobs: | ||
test: | ||
uses: ./.github/workflows/test-and-build.yml | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
secrets: inherit | ||
|
||
pre-commit: | ||
uses: ./.github/workflows/pre-commit.yml | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
secrets: inherit | ||
|
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