Improved CI
parent
c810216273
commit
2aa37165d8
|
|
@ -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
|
# 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:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v3
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# 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.
|
# 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.
|
# 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
|
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# 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)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v3
|
uses: github/codeql-action/autobuild@v3
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
|
|
||||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
# ✏️ 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
|
# and modify them (or add more) to build your code if your project
|
||||||
# uses a compiled language
|
# uses a compiled language
|
||||||
|
|
||||||
#- run: |
|
#- run: |
|
||||||
# make bootstrap
|
# make bootstrap
|
||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v3
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-issue-message: "This issue is stale because it has been open for 21 days with no activity."
|
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"
|
stale-issue-label: "Status: Stale"
|
||||||
only-labels: "Type: Question"
|
only-labels: "Type: Question"
|
||||||
exempt-issue-labels: "Status: In Progress"
|
exempt-issue-labels: "Status: In Progress"
|
||||||
|
|
|
||||||
32
Taskfile.yml
32
Taskfile.yml
|
|
@ -3,7 +3,12 @@ version: '3'
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
default:
|
default:
|
||||||
deps: [format, lint, test]
|
cmds:
|
||||||
|
- task: format
|
||||||
|
- task: lint_and_test
|
||||||
|
|
||||||
|
lint_and_test:
|
||||||
|
deps: [lint, test]
|
||||||
|
|
||||||
format:
|
format:
|
||||||
cmds:
|
cmds:
|
||||||
|
|
@ -12,25 +17,26 @@ tasks:
|
||||||
- pnpm format
|
- pnpm format
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
deps: [lint_yaml]
|
deps: [lint_yaml, lint_ruff_format, lint_ruff_check, lint_pnpm]
|
||||||
cmds:
|
|
||||||
- ruff format --respect-gitignore --check
|
|
||||||
- ruff check --respect-gitignore
|
|
||||||
- pnpm lint
|
|
||||||
|
|
||||||
lint_yaml:
|
lint_yaml:
|
||||||
cmds:
|
cmds:
|
||||||
- >-
|
- >-
|
||||||
find . \( -name node_modules -o -name .venv \) \
|
find . \( -name node_modules -o -name .venv \) \
|
||||||
-prune -o -type f \( -name "*.yaml" -o -name "*.yml" \) -print \
|
-prune -o -type f \( -name "*.yaml" -o -name "*.yml" \) -print \
|
||||||
| xargs yamllint --no-warnings -c .yamllint.yml
|
| xargs yamllint
|
||||||
|
|
||||||
lint_shell:
|
lint_ruff_format:
|
||||||
cmds:
|
cmds:
|
||||||
- >-
|
- ruff format --respect-gitignore --check
|
||||||
find . \( -name node_modules -o -name .venv \) \
|
|
||||||
-prune -o -type f -name '*.yml' -print \
|
lint_ruff_check:
|
||||||
| xargs shellcheck
|
cmds:
|
||||||
|
- ruff check --respect-gitignore
|
||||||
|
|
||||||
|
lint_pnpm:
|
||||||
|
cmds:
|
||||||
|
- pnpm lint
|
||||||
|
|
||||||
lint_typos:
|
lint_typos:
|
||||||
cmds:
|
cmds:
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,12 @@
|
||||||
"name": "sd-webui-enable-checker",
|
"name": "sd-webui-enable-checker",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"preinstall": "npx only-allow pnpm",
|
"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:biome": "biome check --write",
|
||||||
"format:markdownlint": "markdownlint -f ./*.md doc/*.md",
|
"format:md": "markdownlint -f ./*.md doc/*.md",
|
||||||
"format:toml": "taplo format *.toml",
|
"format:toml": "taplo format *.toml",
|
||||||
"test": ":",
|
"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:biome": "biome check",
|
||||||
"lint:md": "npx markdownlint *.md docs/*.md",
|
"lint:md": "npx markdownlint *.md docs/*.md",
|
||||||
"lint:pyright": "pyright",
|
"lint:pyright": "pyright",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue