Improved CI

pull/130/head
Yuta Hayashibe 2025-02-14 12:16:16 +09:00
parent c810216273
commit 2aa37165d8
No known key found for this signature in database
GPG Key ID: CD83C5CFA6802211
4 changed files with 48 additions and 42 deletions

View File

@ -38,34 +38,34 @@ jobs:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

View File

@ -15,7 +15,7 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "This issue is stale because it has been open for 21 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
close-issue-message: "Closed because it has been inactive for 14 days since being marked as stale."
stale-issue-label: "Status: Stale"
only-labels: "Type: Question"
exempt-issue-labels: "Status: In Progress"

View File

@ -3,7 +3,12 @@ version: '3'
tasks:
default:
deps: [format, lint, test]
cmds:
- task: format
- task: lint_and_test
lint_and_test:
deps: [lint, test]
format:
cmds:
@ -12,25 +17,26 @@ tasks:
- pnpm format
lint:
deps: [lint_yaml]
cmds:
- ruff format --respect-gitignore --check
- ruff check --respect-gitignore
- pnpm lint
deps: [lint_yaml, lint_ruff_format, lint_ruff_check, lint_pnpm]
lint_yaml:
cmds:
- >-
find . \( -name node_modules -o -name .venv \) \
-prune -o -type f \( -name "*.yaml" -o -name "*.yml" \) -print \
| xargs yamllint --no-warnings -c .yamllint.yml
-prune -o -type f \( -name "*.yaml" -o -name "*.yml" \) -print \
| xargs yamllint
lint_shell:
lint_ruff_format:
cmds:
- >-
find . \( -name node_modules -o -name .venv \) \
-prune -o -type f -name '*.yml' -print \
| xargs shellcheck
- ruff format --respect-gitignore --check
lint_ruff_check:
cmds:
- ruff check --respect-gitignore
lint_pnpm:
cmds:
- pnpm lint
lint_typos:
cmds:

View File

@ -17,12 +17,12 @@
"name": "sd-webui-enable-checker",
"scripts": {
"preinstall": "npx only-allow pnpm",
"format": "run-s format:biome format:markdownlint format:toml",
"format": "run-p format:biome format:md format:toml",
"format:biome": "biome check --write",
"format:markdownlint": "markdownlint -f ./*.md doc/*.md",
"format:md": "markdownlint -f ./*.md doc/*.md",
"format:toml": "taplo format *.toml",
"test": ":",
"lint": "run-s lint:biome lint:md lint:pyright lint:toml",
"lint": "run-p lint:biome lint:md lint:pyright lint:toml",
"lint:biome": "biome check",
"lint:md": "npx markdownlint *.md docs/*.md",
"lint:pyright": "pyright",