-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add precommit and ci, remove sonar logic
- Loading branch information
1 parent
cd27ae0
commit dbcdbfc
Showing
9 changed files
with
116 additions
and
27 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,29 @@ | ||
name: "[GitHub] Validate PR title" | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, edited, synchronize] | ||
|
||
jobs: | ||
main: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
with: | ||
types: | | ||
chore | ||
ci | ||
docs | ||
feat | ||
fix | ||
requireScope: false | ||
subjectPattern: ^(?![A-Z]).+$ | ||
subjectPatternError: | | ||
The subject "{subject}" found in the pull request title "{title}" | ||
didn't match the configured pattern. Please ensure that the subject | ||
starts with an uppercase character. | ||
wip: true | ||
validateSingleCommit: true |
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,24 @@ | ||
name: "[GitHub] Mark stale issues and PRs" | ||
on: | ||
schedule: | ||
- cron: '30 1 * * *' | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
|
||
# ref: https://github.com/actions/stale?tab=readme-ov-file#recommended-permissions | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity.' | ||
stale-pr-message: 'This pull request is stale because it has been open 60 days with no activity.' | ||
days-before-stale: 60 | ||
days-before-close: -1 | ||
stale-issue-label: 'stale' | ||
stale-pr-label: 'stale' |
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,43 @@ | ||
name: "[QA] Quality Checks API" | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
paths: | ||
- 'runner/*' | ||
- 'sdk/*' | ||
push: | ||
paths: | ||
- 'runner/*' | ||
- 'sdk/*' | ||
|
||
jobs: | ||
quality-checks: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
checks: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.23.2 | ||
|
||
- name: Linter | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.62.2 | ||
args: --config ../.github/.golangci.yml | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Tests | ||
run: go test ./... --tags=integration,unit -cover -v |
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,19 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: trailing-whitespace | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- repo: https://github.com/zricethezav/gitleaks | ||
rev: v8.21.1 | ||
hooks: | ||
- id: gitleaks | ||
- repo: https://github.com/dnephin/pre-commit-golang | ||
rev: v0.5.1 | ||
hooks: | ||
- id: golangci-lint | ||
args: ['--config', '.github/.golangci.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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.