ci(qodana): one workflow, interpreter, Rust build deps, Svelte via Docker
What the first runs showed, and the changes:
- Python: SDKs.json was empty - native mode finds no interpreter by
itself, and without one every `dict[int, str]` and `X | None` was an
"invalid type hint" (11 of the 50 problems). The job now builds .venv
from the hashed requirements and passes QODANA_PYTHON_PATH.
- Rust: "Analysis scope: 0 packages" and a Critical "Cargo project
loading" sanity problem: the image has no C linker and none of
Tauri's libraries, and runs as the runner's user, who can neither
apt-get install nor write the image's CARGO_HOME. Now `-u root`,
CARGO_HOME in the cached Qodana cache dir, and a bootstrap that
installs the build packages.
- JS/TS: installing the Svelte plugin fails in native mode with every
released CLI up to 2026.2.3 ("qodana.build.date system property must
be set"; fixed upstream as QD-16701 on 2026-11-05, unreleased), so
this project runs in the Qodana image, on the node_modules and
generated files the job prepared.
One workflow (qodana.yml) with a job per project, as in
free-games-itchio-list: the token check covers all three, triggers skip
data and Markdown-only commits, no PR comment (annotations, Qodana
Cloud and the report artifact carry the results), --repository-root .
for the subdirectory projects, and each job keeps its own cache keys.
The qodana.yaml files use `exclude` and name their Qodana Cloud project.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
629cb1df75
commit
a956c8e182
7 files changed
+272
-369
No files matched your search
@@ -1,112 +0,0 @@
|
|||||||
name: Qodana (JS/TS)
|
|
||||||
|
|
||||||
# JetBrains Qodana for JS (an Ultimate linter) over web/: the SvelteKit site,
|
|
||||||
# the admin SPA, the Cloudflare Worker, the shared modules and the build code.
|
|
||||||
# It reports to its own Qodana Cloud project, whose project token is the
|
|
||||||
# repository secret QODANA_TOKEN_TS_JS. The pipeline is qodana-python.yml, the
|
|
||||||
# Tauri shell under web/src-tauri/ is qodana-rust.yml; what each scan reads and
|
|
||||||
# ignores is the qodana.yaml in its project directory.
|
|
||||||
#
|
|
||||||
# Native mode (web/qodana.yaml, `withinDocker: false`): the analysis runs on
|
|
||||||
# this runner, with the Node every other workflow uses and node_modules
|
|
||||||
# installed exactly as web-ci.yml installs it. The Qodana image brings an
|
|
||||||
# older Node, and would have to install the packages itself.
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
paths:
|
|
||||||
- 'web/**'
|
|
||||||
- '!web/src-tauri/**'
|
|
||||||
- '.github/workflows/qodana-js.yml'
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
paths:
|
|
||||||
- 'web/**'
|
|
||||||
- '!web/src-tauri/**'
|
|
||||||
- '.github/workflows/qodana-js.yml'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: qodana-js-${{ github.ref }}
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Pull requests from forks and from Dependabot get no repository secrets,
|
|
||||||
# and an Ultimate linter will not run without the token, so the scan is
|
|
||||||
# skipped rather than failing every such pull request (as sonarcloud.yml).
|
|
||||||
token:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 5
|
|
||||||
outputs:
|
|
||||||
present: ${{ steps.check.outputs.present }}
|
|
||||||
steps:
|
|
||||||
- name: Check for the token
|
|
||||||
id: check
|
|
||||||
env:
|
|
||||||
HAS_TOKEN: ${{ secrets.QODANA_TOKEN_TS_JS != '' }}
|
|
||||||
run: |
|
|
||||||
echo "present=$HAS_TOKEN" >> "$GITHUB_OUTPUT"
|
|
||||||
if [ "$HAS_TOKEN" != "true" ]; then
|
|
||||||
echo "::notice::QODANA_TOKEN_TS_JS is not available to this run; skipping the Qodana scan."
|
|
||||||
fi
|
|
||||||
|
|
||||||
scan:
|
|
||||||
needs: token
|
|
||||||
if: needs.token.outputs.present == 'true'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 40
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
checks: write # annotations on the commit
|
|
||||||
pull-requests: write # the summary comment on a pull request
|
|
||||||
steps:
|
|
||||||
# The pull request's own head commit, not the merge GitHub makes, so the
|
|
||||||
# report and its annotations name commits that exist; full history, as
|
|
||||||
# Qodana Cloud's setup snippet has it.
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
fetch-depth: 0
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v7
|
|
||||||
with:
|
|
||||||
node-version: '26'
|
|
||||||
cache: 'npm'
|
|
||||||
cache-dependency-path: web/package-lock.json
|
|
||||||
|
|
||||||
# --ignore-scripts, as everywhere this repo runs `npm ci` (web-ci.yml
|
|
||||||
# says why).
|
|
||||||
- name: Install web/
|
|
||||||
working-directory: web
|
|
||||||
run: npm ci --ignore-scripts
|
|
||||||
|
|
||||||
# `svelte-kit sync` writes the tsconfig web/tsconfig.json extends and the
|
|
||||||
# route types, and the admin build writes worker/generated/, which
|
|
||||||
# worker/index.ts imports. Without them the analysis reads the app
|
|
||||||
# untyped and the Worker with an unresolved import (sonarcloud.yml does
|
|
||||||
# the same before its scan).
|
|
||||||
- name: Generate SvelteKit's types and the admin bundle
|
|
||||||
working-directory: web
|
|
||||||
run: npm run build:admin
|
|
||||||
|
|
||||||
# web/ is the project. The cache keys name the linter: the three Qodana
|
|
||||||
# workflows run on the same commits, and the action's default keys would
|
|
||||||
# collide. pr-mode false: a pull request is analysed whole, as Qodana
|
|
||||||
# Cloud's setup suggests, not only the files it changes.
|
|
||||||
- name: Qodana scan
|
|
||||||
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
|
|
||||||
with:
|
|
||||||
args: --project-dir web
|
|
||||||
pr-mode: false
|
|
||||||
upload-result: true
|
|
||||||
artifact-name: qodana-js
|
|
||||||
primary-cache-key: qodana-2026.2-js-${{ github.ref }}-${{ github.sha }}
|
|
||||||
additional-cache-key: qodana-2026.2-js-${{ github.ref }}
|
|
||||||
cache-default-branch-only: true
|
|
||||||
env:
|
|
||||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_TS_JS }}
|
|
||||||
QODANA_ENDPOINT: 'https://qodana.cloud'
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
name: Qodana (Python)
|
|
||||||
|
|
||||||
# JetBrains Qodana for Python (an Ultimate linter) over scripts/, the data
|
|
||||||
# pipeline and its tests. It reports to its own Qodana Cloud project, whose
|
|
||||||
# project token is the repository secret QODANA_TOKEN_PYTHON. The site and the
|
|
||||||
# Worker are qodana-js.yml, the Tauri shell is qodana-rust.yml; what each scan
|
|
||||||
# reads and ignores is the qodana.yaml in its project directory.
|
|
||||||
#
|
|
||||||
# Native mode (scripts/qodana.yaml, `withinDocker: false`): the analysis runs
|
|
||||||
# on this runner, so it sees the Python the pipeline runs on and the pinned
|
|
||||||
# packages, installed exactly as python-tests.yml installs them. The Qodana
|
|
||||||
# image would bring its own, older interpreter and none of the packages.
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
# The pipeline's code, not the queues and logs the data jobs commit
|
|
||||||
# beside it (scripts/*.jsonl, scripts/*.log).
|
|
||||||
paths:
|
|
||||||
- 'scripts/**/*.py'
|
|
||||||
- 'scripts/qodana.yaml'
|
|
||||||
- 'requirements.txt'
|
|
||||||
- 'requirements-test.txt'
|
|
||||||
- '.github/workflows/qodana-python.yml'
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
paths:
|
|
||||||
- 'scripts/**/*.py'
|
|
||||||
- 'scripts/qodana.yaml'
|
|
||||||
- 'requirements.txt'
|
|
||||||
- 'requirements-test.txt'
|
|
||||||
- '.github/workflows/qodana-python.yml'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: qodana-python-${{ github.ref }}
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Pull requests from forks and from Dependabot get no repository secrets,
|
|
||||||
# and an Ultimate linter will not run without the token, so the scan is
|
|
||||||
# skipped rather than failing every such pull request (as sonarcloud.yml).
|
|
||||||
token:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 5
|
|
||||||
outputs:
|
|
||||||
present: ${{ steps.check.outputs.present }}
|
|
||||||
steps:
|
|
||||||
- name: Check for the token
|
|
||||||
id: check
|
|
||||||
env:
|
|
||||||
HAS_TOKEN: ${{ secrets.QODANA_TOKEN_PYTHON != '' }}
|
|
||||||
run: |
|
|
||||||
echo "present=$HAS_TOKEN" >> "$GITHUB_OUTPUT"
|
|
||||||
if [ "$HAS_TOKEN" != "true" ]; then
|
|
||||||
echo "::notice::QODANA_TOKEN_PYTHON is not available to this run; skipping the Qodana scan."
|
|
||||||
fi
|
|
||||||
|
|
||||||
scan:
|
|
||||||
needs: token
|
|
||||||
if: needs.token.outputs.present == 'true'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 30
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
checks: write # annotations on the commit
|
|
||||||
pull-requests: write # the summary comment on a pull request
|
|
||||||
steps:
|
|
||||||
# The pull request's own head commit, not the merge GitHub makes, so the
|
|
||||||
# report and its annotations name commits that exist; full history, as
|
|
||||||
# Qodana Cloud's setup snippet has it.
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
fetch-depth: 0
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: '3.15'
|
|
||||||
|
|
||||||
# Hash mode is all-or-nothing per pip call, hence two (python-tests.yml).
|
|
||||||
# The tests are analysed too, so pytest has to resolve.
|
|
||||||
- name: Install the pipeline and the test tools
|
|
||||||
run: |
|
|
||||||
pip install --quiet --require-hashes --only-binary :all: -r requirements.txt
|
|
||||||
pip install --quiet --require-hashes --only-binary :all: -r requirements-test.txt
|
|
||||||
|
|
||||||
# scripts/ is the project, not the repository root: every script and the
|
|
||||||
# tests put scripts/ on sys.path and import `core`, which resolves only
|
|
||||||
# when scripts/ is the content root. The repository root is still found
|
|
||||||
# (git), so the report's paths and links are the repository's.
|
|
||||||
# The cache keys name the linter: the three Qodana workflows run on the
|
|
||||||
# same commits, and the action's default keys would collide.
|
|
||||||
# pr-mode false: a pull request is analysed whole, as Qodana Cloud's
|
|
||||||
# setup suggests, not only the files it changes.
|
|
||||||
- name: Qodana scan
|
|
||||||
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
|
|
||||||
with:
|
|
||||||
args: --project-dir scripts
|
|
||||||
pr-mode: false
|
|
||||||
upload-result: true
|
|
||||||
artifact-name: qodana-python
|
|
||||||
primary-cache-key: qodana-2026.2-python-${{ github.ref }}-${{ github.sha }}
|
|
||||||
additional-cache-key: qodana-2026.2-python-${{ github.ref }}
|
|
||||||
cache-default-branch-only: true
|
|
||||||
env:
|
|
||||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_PYTHON }}
|
|
||||||
QODANA_ENDPOINT: 'https://qodana.cloud'
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
name: Qodana (Rust)
|
|
||||||
|
|
||||||
# JetBrains Qodana for Rust (an Ultimate linter, Early Access in 2026.2) over
|
|
||||||
# web/src-tauri/, the Tauri 2 desktop and Android shell. It reports to its own
|
|
||||||
# Qodana Cloud project, whose project token is the repository secret
|
|
||||||
# QODANA_TOKEN_RUST. The pipeline is qodana-python.yml, the rest of web/ is
|
|
||||||
# qodana-js.yml; what each scan reads and ignores is the qodana.yaml in its
|
|
||||||
# project directory.
|
|
||||||
#
|
|
||||||
# Docker mode: Qodana for Rust has no native mode. The CLI mounts the whole
|
|
||||||
# repository into the container (the project directory is inside it), and the
|
|
||||||
# image brings its own Rust toolchain.
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
paths:
|
|
||||||
- 'web/src-tauri/**'
|
|
||||||
- '!web/src-tauri/gen/**'
|
|
||||||
- '.github/workflows/qodana-rust.yml'
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
paths:
|
|
||||||
- 'web/src-tauri/**'
|
|
||||||
- '!web/src-tauri/gen/**'
|
|
||||||
- '.github/workflows/qodana-rust.yml'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: qodana-rust-${{ github.ref }}
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Pull requests from forks and from Dependabot get no repository secrets,
|
|
||||||
# and an Ultimate linter will not run without the token, so the scan is
|
|
||||||
# skipped rather than failing every such pull request (as sonarcloud.yml).
|
|
||||||
token:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 5
|
|
||||||
outputs:
|
|
||||||
present: ${{ steps.check.outputs.present }}
|
|
||||||
steps:
|
|
||||||
- name: Check for the token
|
|
||||||
id: check
|
|
||||||
env:
|
|
||||||
HAS_TOKEN: ${{ secrets.QODANA_TOKEN_RUST != '' }}
|
|
||||||
run: |
|
|
||||||
echo "present=$HAS_TOKEN" >> "$GITHUB_OUTPUT"
|
|
||||||
if [ "$HAS_TOKEN" != "true" ]; then
|
|
||||||
echo "::notice::QODANA_TOKEN_RUST is not available to this run; skipping the Qodana scan."
|
|
||||||
fi
|
|
||||||
|
|
||||||
scan:
|
|
||||||
needs: token
|
|
||||||
if: needs.token.outputs.present == 'true'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 45
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
checks: write # annotations on the commit
|
|
||||||
pull-requests: write # the summary comment on a pull request
|
|
||||||
steps:
|
|
||||||
# The pull request's own head commit, not the merge GitHub makes, so the
|
|
||||||
# report and its annotations name commits that exist; full history, as
|
|
||||||
# Qodana Cloud's setup snippet has it.
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
fetch-depth: 0
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
# tauri::generate_context!() embeds frontendDist (../dist) when it
|
|
||||||
# expands, and fails when the directory is missing. The analysis needs
|
|
||||||
# the macro to expand, not the site, so a stand-in page is enough; the
|
|
||||||
# real build is the release workflows'.
|
|
||||||
- name: Stand in for the frontend build
|
|
||||||
run: |
|
|
||||||
mkdir -p web/dist
|
|
||||||
printf '<!doctype html>\n<title>F2P Tracker</title>\n' > web/dist/index.html
|
|
||||||
|
|
||||||
# web/src-tauri/ is the project: its Cargo.toml is the crate. The cache
|
|
||||||
# keys name the linter: the three Qodana workflows run on the same
|
|
||||||
# commits, and the action's default keys would collide. pr-mode false: a
|
|
||||||
# pull request is analysed whole, as Qodana Cloud's setup suggests, not
|
|
||||||
# only the files it changes.
|
|
||||||
- name: Qodana scan
|
|
||||||
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
|
|
||||||
with:
|
|
||||||
args: --project-dir web/src-tauri
|
|
||||||
pr-mode: false
|
|
||||||
upload-result: true
|
|
||||||
artifact-name: qodana-rust
|
|
||||||
primary-cache-key: qodana-2026.2-rust-${{ github.ref }}-${{ github.sha }}
|
|
||||||
additional-cache-key: qodana-2026.2-rust-${{ github.ref }}
|
|
||||||
cache-default-branch-only: true
|
|
||||||
env:
|
|
||||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_RUST }}
|
|
||||||
QODANA_ENDPOINT: 'https://qodana.cloud'
|
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
# Qodana (JetBrains) static analysis, one linter per Qodana Cloud project:
|
||||||
|
#
|
||||||
|
# typescript - qodana-js web/ https://qodana.cloud/projects/GgGyE
|
||||||
|
# python - qodana-python scripts/ https://qodana.cloud/projects/P2R5k
|
||||||
|
# rust - qodana-rust web/src-tauri/ https://qodana.cloud/projects/40daO
|
||||||
|
#
|
||||||
|
# Each project has its own token (a repository secret) and its own settings
|
||||||
|
# file (the qodana.yaml in the directory above). Every run analyses the whole
|
||||||
|
# project (`pr-mode: false`), so a pull request and `main` report the same way.
|
||||||
|
# All three are Ultimate linters (Qodana for Rust is also Early Access): when
|
||||||
|
# the licence ends, every job fails on it - renew it, or delete this file and
|
||||||
|
# the three qodana.yaml files.
|
||||||
|
#
|
||||||
|
# Dependabot and fork PRs get no repository secrets: the analysis is skipped
|
||||||
|
# there, not failed (the `tokens` job). Dependencies are installed before the
|
||||||
|
# scan, in steps that don't see the token.
|
||||||
|
name: Qodana
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
# Data commits (the pipeline's, the admin Worker's) and docs change no code.
|
||||||
|
paths-ignore:
|
||||||
|
- 'data/**'
|
||||||
|
- 'games/**'
|
||||||
|
- 'scripts/*.jsonl'
|
||||||
|
- 'scripts/*.log'
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- 'data/**'
|
||||||
|
- 'games/**'
|
||||||
|
- 'scripts/*.jsonl'
|
||||||
|
- 'scripts/*.log'
|
||||||
|
- '**.md'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: qodana-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tokens:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 5
|
||||||
|
permissions: {}
|
||||||
|
outputs:
|
||||||
|
present: ${{ steps.check.outputs.present }}
|
||||||
|
steps:
|
||||||
|
- name: Check for the Qodana tokens
|
||||||
|
id: check
|
||||||
|
env:
|
||||||
|
HAS_TS_JS: ${{ secrets.QODANA_TOKEN_TS_JS != '' }}
|
||||||
|
HAS_PYTHON: ${{ secrets.QODANA_TOKEN_PYTHON != '' }}
|
||||||
|
HAS_RUST: ${{ secrets.QODANA_TOKEN_RUST != '' }}
|
||||||
|
run: |
|
||||||
|
if [ "$HAS_TS_JS" = true ] && [ "$HAS_PYTHON" = true ] && [ "$HAS_RUST" = true ]; then
|
||||||
|
echo "present=true" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "::notice::No Qodana tokens in this run (Dependabot or fork PR): Qodana analysis skipped."
|
||||||
|
fi
|
||||||
|
|
||||||
|
typescript:
|
||||||
|
name: TypeScript / JavaScript
|
||||||
|
needs: tokens
|
||||||
|
if: needs.tokens.outputs.present == 'true'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 40
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
checks: write # the action's annotations
|
||||||
|
steps:
|
||||||
|
# The pull request's own head commit, not the merge GitHub makes, so
|
||||||
|
# the report names a commit that exists; full history for its VCS data.
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v7
|
||||||
|
with:
|
||||||
|
node-version: '26'
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: web/package-lock.json
|
||||||
|
|
||||||
|
# The linter resolves imports and types from node_modules.
|
||||||
|
# --ignore-scripts, as everywhere this repo runs `npm ci` (web-ci.yml
|
||||||
|
# says why).
|
||||||
|
- name: Install web/
|
||||||
|
working-directory: web
|
||||||
|
run: npm ci --ignore-scripts
|
||||||
|
|
||||||
|
# `svelte-kit sync` writes the tsconfig web/tsconfig.json extends and the
|
||||||
|
# route types; the admin build writes worker/generated/, which
|
||||||
|
# worker/index.ts imports. Without them the app reads untyped and the
|
||||||
|
# Worker has an unresolved import (sonarcloud.yml does the same).
|
||||||
|
- name: Generate SvelteKit's types and the admin bundle
|
||||||
|
working-directory: web
|
||||||
|
run: npm run build:admin
|
||||||
|
|
||||||
|
# Docker, not native: the components are .svelte files, which only
|
||||||
|
# JetBrains' Svelte plugin reads (web/qodana.yaml), and installing a
|
||||||
|
# plugin fails in native mode with every released CLI up to 2026.2.3
|
||||||
|
# ("qodana.build.date system property must be set", fixed upstream as
|
||||||
|
# QD-16701 after that release). The container sees this checkout,
|
||||||
|
# node_modules and the generated files included.
|
||||||
|
# --project-dir <subdir> --repository-root . keeps the git data.
|
||||||
|
- name: Qodana scan
|
||||||
|
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
|
||||||
|
with:
|
||||||
|
args: --project-dir web --repository-root . --linter qodana-js
|
||||||
|
pr-mode: false
|
||||||
|
post-pr-comment: false
|
||||||
|
upload-result: true
|
||||||
|
artifact-name: qodana-report-typescript
|
||||||
|
# The default keys are the same for every job of a run.
|
||||||
|
primary-cache-key: qodana-2026.2-js-${{ github.ref }}-${{ github.sha }}
|
||||||
|
additional-cache-key: qodana-2026.2-js-${{ github.ref }}
|
||||||
|
cache-default-branch-only: true
|
||||||
|
env:
|
||||||
|
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_TS_JS }}
|
||||||
|
|
||||||
|
python:
|
||||||
|
name: Python
|
||||||
|
needs: tokens
|
||||||
|
if: needs.tokens.outputs.present == 'true'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 30
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
checks: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v6
|
||||||
|
with:
|
||||||
|
python-version: '3.15'
|
||||||
|
|
||||||
|
# Hash-locked, wheels only, one pip call per file (hash mode is
|
||||||
|
# all-or-nothing per call), as python-tests.yml. The tests are analysed
|
||||||
|
# too, so pytest has to resolve. In native mode the linter finds no
|
||||||
|
# interpreter by itself (SDKs.json empty: it then calls every
|
||||||
|
# `dict[str, int]` and `X | None` an invalid type hint): it gets this
|
||||||
|
# virtual environment through QODANA_PYTHON_PATH below.
|
||||||
|
- name: Install the pipeline and the test tools
|
||||||
|
run: |
|
||||||
|
python -m venv .venv
|
||||||
|
.venv/bin/pip install --quiet --require-hashes --only-binary :all: -r requirements.txt
|
||||||
|
.venv/bin/pip install --quiet --require-hashes --only-binary :all: -r requirements-test.txt
|
||||||
|
|
||||||
|
# Native mode (scripts/qodana.yaml): the Qodana image would bring an
|
||||||
|
# older Python. scripts/ is the project: every script and the tests put
|
||||||
|
# it on sys.path and import `core`, which resolves only when scripts/ is
|
||||||
|
# the content root.
|
||||||
|
- name: Qodana scan
|
||||||
|
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
|
||||||
|
with:
|
||||||
|
args: --project-dir scripts --repository-root . --linter qodana-python --within-docker false
|
||||||
|
pr-mode: false
|
||||||
|
post-pr-comment: false
|
||||||
|
upload-result: true
|
||||||
|
artifact-name: qodana-report-python
|
||||||
|
primary-cache-key: qodana-2026.2-python-${{ github.ref }}-${{ github.sha }}
|
||||||
|
additional-cache-key: qodana-2026.2-python-${{ github.ref }}
|
||||||
|
cache-default-branch-only: true
|
||||||
|
env:
|
||||||
|
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_PYTHON }}
|
||||||
|
QODANA_PYTHON_PATH: ${{ github.workspace }}/.venv/bin/python
|
||||||
|
|
||||||
|
rust:
|
||||||
|
name: Rust
|
||||||
|
needs: tokens
|
||||||
|
if: needs.tokens.outputs.present == 'true'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 45
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
checks: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
# tauri::generate_context!() refuses to expand without the frontend
|
||||||
|
# directory (frontendDist, ../dist): an empty page stands in for the
|
||||||
|
# web build, which the analysis does not need.
|
||||||
|
- name: Stand-in for the web build
|
||||||
|
run: |
|
||||||
|
mkdir -p web/dist
|
||||||
|
echo '<!doctype html><title>stand-in</title>' > web/dist/index.html
|
||||||
|
|
||||||
|
# qodana-rust ships only as a Docker image. It runs as root so that its
|
||||||
|
# bootstrap (web/src-tauri/qodana.yaml) can install the C toolchain and
|
||||||
|
# the libraries Tauri links against: without them `cargo check` fails
|
||||||
|
# and the linter loads no Cargo package at all ("Cargo project
|
||||||
|
# loading"). The crates go to the (cached) Qodana cache directory, which
|
||||||
|
# the runner's user could not write in the image's own CARGO_HOME.
|
||||||
|
- name: Qodana scan
|
||||||
|
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
|
||||||
|
with:
|
||||||
|
args: --project-dir web/src-tauri --repository-root . --linter qodana-rust -u root -e CARGO_HOME=/data/cache/cargo
|
||||||
|
pr-mode: false
|
||||||
|
post-pr-comment: false
|
||||||
|
upload-result: true
|
||||||
|
artifact-name: qodana-report-rust
|
||||||
|
primary-cache-key: qodana-2026.2-rust-${{ github.ref }}-${{ github.sha }}
|
||||||
|
additional-cache-key: qodana-2026.2-rust-${{ github.ref }}
|
||||||
|
cache-default-branch-only: true
|
||||||
|
env:
|
||||||
|
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_RUST }}
|
||||||
+16
-13
@@ -1,22 +1,25 @@
|
|||||||
# Qodana for Python over the data pipeline (.github/workflows/qodana-python.yml,
|
# Qodana for Python: the data pipeline and its tests. Run by
|
||||||
# Qodana Cloud project token QODANA_TOKEN_PYTHON).
|
# .github/workflows/qodana.yml (job `python`), reported to
|
||||||
|
# https://qodana.cloud/projects/P2R5k. The web app and the Tauri shell have
|
||||||
|
# their own projects: web/qodana.yaml and web/src-tauri/qodana.yaml.
|
||||||
#
|
#
|
||||||
# This directory is the project, not the repository root: every script and
|
# This directory is the project, not the repository root: every script and
|
||||||
# the tests put scripts/ on sys.path and import `core`, which resolves only
|
# the tests put scripts/ on sys.path and import `core`, which resolves only
|
||||||
# when scripts/ is the content root.
|
# when scripts/ is the content root.
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
linter: qodana-python
|
linter: qodana-python
|
||||||
# Native mode: the runner's Python 3.15 with requirements.txt and
|
# Native mode: the runner's Python 3.15, with requirements.txt and
|
||||||
# requirements-test.txt installed, as the pipeline itself runs.
|
# requirements-test.txt in the virtual environment the job passes as
|
||||||
|
# QODANA_PYTHON_PATH.
|
||||||
withinDocker: false
|
withinDocker: false
|
||||||
profile:
|
profile:
|
||||||
name: qodana.recommended
|
name: qodana.recommended
|
||||||
inspections:
|
exclude:
|
||||||
# Data, not code: the queues and the log the data jobs commit here, and
|
- name: All
|
||||||
# the byte-exact blocklist golden file the tests compare against.
|
paths:
|
||||||
- group: ALL
|
# Data the jobs commit here, not code.
|
||||||
ignore:
|
- removed_games.jsonl
|
||||||
- "removed_games.jsonl"
|
- temp_info.jsonl
|
||||||
- "temp_info.jsonl"
|
- dead_games.log
|
||||||
- "dead_games.log"
|
# The byte-exact blocklist golden file the tests compare against.
|
||||||
- "tests/fixtures"
|
- tests/fixtures
|
||||||
+21
-23
@@ -1,30 +1,28 @@
|
|||||||
# Qodana for JS over web/ (.github/workflows/qodana-js.yml, Qodana Cloud
|
# Qodana for JavaScript / TypeScript: the site, the admin SPA, the Worker,
|
||||||
# project token QODANA_TOKEN_TS_JS): the site, the admin SPA, the Worker, the
|
# the shared modules and the build code. Run by .github/workflows/qodana.yml
|
||||||
# shared modules and the build code. src-tauri/ is Rust, and has its own scan
|
# (job `typescript`), reported to https://qodana.cloud/projects/GgGyE.
|
||||||
# (qodana-rust.yml, src-tauri/qodana.yaml).
|
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
linter: qodana-js
|
linter: qodana-js
|
||||||
# Native mode: the runner's Node 26 with node_modules installed by
|
|
||||||
# `npm ci --ignore-scripts`, and the files `npm run build:admin` generates
|
|
||||||
# (the workflow runs both first).
|
|
||||||
withinDocker: false
|
|
||||||
# The components are .svelte files, which the linter reads only with
|
# The components are .svelte files, which the linter reads only with
|
||||||
# JetBrains' Svelte plugin; it is not bundled with Qodana for JS.
|
# JetBrains' Svelte plugin; it is not bundled with Qodana for JS. Plugins
|
||||||
|
# install in Docker mode only (the workflow says why), so this project runs
|
||||||
|
# in the Qodana image, on the node_modules the job installed.
|
||||||
plugins:
|
plugins:
|
||||||
- id: dev.blachut.svelte.lang
|
- id: dev.blachut.svelte.lang
|
||||||
profile:
|
profile:
|
||||||
name: qodana.recommended
|
name: qodana.recommended
|
||||||
inspections:
|
exclude:
|
||||||
- group: ALL
|
- name: All
|
||||||
ignore:
|
paths:
|
||||||
# The Tauri shell: Rust, and the generated Android project.
|
# The Tauri shell is the Rust project (src-tauri/qodana.yaml).
|
||||||
- "src-tauri"
|
- src-tauri
|
||||||
# Generated: by the build (dist, .admin-build), by `svelte-kit sync`
|
# Build output and reports.
|
||||||
# (.svelte-kit), by the admin build for the Worker (worker/generated),
|
- dist
|
||||||
# by the coverage run (coverage). The types in them still resolve;
|
- .admin-build
|
||||||
# they are only not reported on.
|
- coverage
|
||||||
- "dist"
|
# Generated: by `svelte-kit sync`, by the admin build (for the Worker),
|
||||||
- ".admin-build"
|
# and by `wrangler types` (then spliced by hand, CLAUDE.md). Their types
|
||||||
- ".svelte-kit"
|
# still resolve; they are only not reported on.
|
||||||
- "worker/generated"
|
- .svelte-kit
|
||||||
- "coverage"
|
- worker/generated
|
||||||
|
- worker-configuration.d.ts
|
||||||
+16
-10
@@ -1,14 +1,20 @@
|
|||||||
# Qodana for Rust over the Tauri 2 shell (.github/workflows/qodana-rust.yml,
|
# Qodana for Rust (Early Access): the Tauri 2 shell of the desktop and
|
||||||
# Qodana Cloud project token QODANA_TOKEN_RUST). Early Access in 2026.2, and
|
# Android apps. Run by .github/workflows/qodana.yml (job `rust`), reported to
|
||||||
# Docker only: the image brings its own Rust toolchain.
|
# https://qodana.cloud/projects/40daO.
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
linter: qodana-rust
|
linter: qodana-rust
|
||||||
profile:
|
profile:
|
||||||
name: qodana.recommended
|
name: qodana.recommended
|
||||||
inspections:
|
# The linter evaluates build scripts and expands macros with `cargo check`,
|
||||||
- group: ALL
|
# and its image has neither a C linker nor the libraries Tauri links against.
|
||||||
ignore:
|
# Needs root in the container (the workflow passes `-u root`).
|
||||||
# Generated by `tauri android init`, and Kotlin/Gradle, not Rust.
|
bootstrap: |
|
||||||
- "gen"
|
apt-get update -qq
|
||||||
# Cargo's build output.
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends build-essential pkg-config libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libssl-dev libxdo-dev
|
||||||
- "target"
|
exclude:
|
||||||
|
- name: All
|
||||||
|
paths:
|
||||||
|
# Cargo's build output, and the Android project `tauri android init`
|
||||||
|
# generates (Kotlin and Gradle, not Rust).
|
||||||
|
- target
|
||||||
|
- gen
|
||||||
Reference in new issue
Block a user