Beispiele
Jede Datei hier liegt in samples/ und wird in CI gegen alle drei Plattformen validiert — nichts auf dieser Seite kann von der Engine abweichen.
Kleinste nützliche Config
yaml
# yaml-language-server: $schema=https://quickrun.org/quickrun.schema.json
# What this shows: the smallest useful config - check node, install, start a dev server.
version: 1
name: Vite dev server
requires:
- tool: node
version: ">=20"
install: https://nodejs.org/en/download
setup:
- npm ci
tasks:
- name: web
run: npm run dev
readyWhen: {port: 5173}
open: true.NET-Webanwendung
yaml
# yaml-language-server: $schema=https://quickrun.org/quickrun.schema.json
# What this shows: verifying an SDK version before running an ASP.NET Core app.
version: 1
name: ASP.NET Core API
requires:
- tool: dotnet
version: ">=9.0"
install: https://dot.net
env:
ASPNETCORE_ENVIRONMENT: Development
setup:
- dotnet restore
tasks:
- name: api
run: dotnet run --project src/Api
readyWhen: {log: 'Now listening on: (?<url>\S+)'}
open: truePython mit virtueller Umgebung
Zeigt, wie Platform-Maps mit dem Layout-Unterschied der venv zwischen Windows und dem Rest umgehen.
yaml
# yaml-language-server: $schema=https://quickrun.org/quickrun.schema.json
# What this shows: a virtual environment, and how platform maps handle the venv layout difference.
version: 1
name: Flask app
requires:
- tool: python
version: ">=3.11"
install: https://www.python.org/downloads/
setup:
- run:
windows: python -m venv .venv
linux: python3 -m venv .venv
macos: python3 -m venv .venv
- run:
windows: .venv\Scripts\pip install -r requirements.txt
linux: .venv/bin/pip install -r requirements.txt
macos: .venv/bin/pip install -r requirements.txt
tasks:
- name: web
run:
windows: .venv\Scripts\python app.py
linux: .venv/bin/python app.py
macos: .venv/bin/python app.py
readyWhen: {port: 5000}
open: trueMehrere Dienste gleichzeitig
Postgres, eine .NET-API und ein Vite-Frontend, in Abhängigkeitsreihenfolge gestartet und beim Stoppen aufgeräumt.
yaml
# yaml-language-server: $schema=https://quickrun.org/quickrun.schema.json
# What this shows: three runtimes at once, started in dependency order, cleaned up on stop.
version: 1
name: Full stack
requires:
- tool: docker
install: https://docs.docker.com/get-docker/
- tool: dotnet
version: ">=9.0"
- tool: node
version: ">=20"
setup:
- run: npm ci
cwd: web
- dotnet restore
tasks:
- name: db
run: docker compose up -d postgres
readyWhen: {port: 5432}
- name: api
run: dotnet run --project src/Api
dependsOn: [db]
env:
ConnectionStrings__Default: Host=localhost;Database=app;Username=postgres;Password=postgres
readyWhen: {http: "http://localhost:5000/health"}
restart: onFailure
- name: web
run: npm run dev
cwd: web
dependsOn: [api]
readyWhen: {port: 5173}
open: true
stop:
- docker compose downEine bestehende Compose-Datei einpacken
yaml
# yaml-language-server: $schema=https://quickrun.org/quickrun.schema.json
# What this shows: wrapping an existing compose file, including teardown.
version: 1
name: Compose stack
requires:
- tool: docker
install: https://docs.docker.com/get-docker/
tasks:
- name: stack
run: docker compose up
readyWhen: {http: "http://localhost:8080"}
open: true
stop:
- docker compose down -vEin generiertes Eingabeformular
Erforderliches Secret mit validiertem Muster, eine Zahl mit Bereich, ein Dropdown und ein Schalter.
yaml
# yaml-language-server: $schema=https://quickrun.org/quickrun.schema.json
# What this shows: a generated form - required secret, validated pattern, number range, dropdown.
version: 1
name: AI chat demo
inputs:
- id: apiKey
label: OpenAI API key
type: password
description: Created at platform.openai.com
required: true
pattern: "^sk-"
env: OPENAI_API_KEY
- id: port
label: Port
type: number
default: "3000"
min: 1024
max: 65535
env: PORT
- id: model
label: Model
type: select
options: [gpt-4o-mini, gpt-4o]
default: gpt-4o-mini
env: MODEL
- id: verbose
label: Verbose logging
type: bool
default: "false"
env: VERBOSE
setup:
- npm ci
tasks:
- name: app
run: npm start
readyWhen: {port: 3000}
open: "http://localhost:${inputs.port}"Ein Skript pro Plattform
yaml
# yaml-language-server: $schema=https://quickrun.org/quickrun.schema.json
# What this shows: one script per platform, the shortest possible config.
version: 1
name: Script runner
run:
windows: powershell -ExecutionPolicy Bypass -File ./run.ps1
linux: ./run.sh
macos: ./run.shEin Repository, das sein SDK mitbringt
Nichts zu require, weil das Setup installiert, was es braucht.
yaml
# yaml-language-server: $schema=https://quickrun.org/quickrun.schema.json
# What this shows: a repository that brings its own SDK, so there is nothing to require.
version: 1
name: Self-contained .NET sample
setup:
- run:
linux: curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh && chmod +x dotnet-install.sh && ./dotnet-install.sh -c 10.0 --install-dir ./dotnet10
macos: curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh && chmod +x dotnet-install.sh && ./dotnet-install.sh -c 10.0 --install-dir ./dotnet10
windows: powershell -NoProfile -Command "Invoke-WebRequest https://dot.net/v1/dotnet-install.ps1 -OutFile dotnet-install.ps1; ./dotnet-install.ps1 -Channel 10.0 -InstallDir ./dotnet10"
- run:
linux: ./dotnet10/dotnet restore
macos: ./dotnet10/dotnet restore
windows: .\dotnet10\dotnet restore
tasks:
- name: sample
run:
linux: ./dotnet10/dotnet run --project ./Samples/MainSample.WebAssembly/MainSample.WebAssembly.csproj
macos: ./dotnet10/dotnet run --project ./Samples/MainSample.WebAssembly/MainSample.WebAssembly.csproj
windows: .\dotnet10\dotnet run --project .\Samples\MainSample.WebAssembly\MainSample.WebAssembly.csproj
readyWhen: {log: 'Now listening on: (?<url>\S+)'}
open: trueQuickRuns eigene Config
QuickRun startet sich selbst; das macht der Extension-Button auf seinem Repository.
yaml
# yaml-language-server: $schema=https://quickrun.org/quickrun.schema.json
# QuickRun runs itself: this is what the extension button does on this repository.
version: 1
name: QuickRun
description: Build and test QuickRun, then show the CLI help.
icon: assets/icon.png
docs: https://quickrun.org
requires:
- tool: dotnet
version: ">=10.0"
install: https://dot.net
setup:
- dotnet restore
- dotnet test --nologo
tasks:
- name: cli
run: dotnet run --project src/QuickRun.App -- --help