Files
nexus/.gitea/workflows/ci.yml

48 lines
1.6 KiB
YAML

# Prüfung bei jedem Push auf einen Branch: Format, clippy, Rust-Tests, JS-Tests, SDK-Tests (→ #1067).
# Läuft auf dem Runner `nexus-runner` (Label `nexus`, nur für dieses Repository).
# Bewusst KEIN Auslöser `pull_request`: Das Repository ist öffentlich, und der Runner hat den Docker-Socket.
# Code aus fremden Forks darf dort nicht laufen.
name: ci
on:
push:
branches:
- '**'
jobs:
pruefen:
runs-on: nexus
steps:
- uses: actions/checkout@v4
- name: Werkzeuge installieren
run: |
SUDO=""; [ "$(id -u)" -ne 0 ] && SUDO="sudo"
$SUDO apt-get update -qq
$SUDO apt-get install -y -qq musl-tools python3-venv nodejs
curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal -c clippy,rustfmt -t x86_64-unknown-linux-musl
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Format
run: cargo fmt --check
- name: clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Rust-Tests
run: cargo test --workspace
# Reine Funktionen der Oberfläche (Ortszeit und Tabellen, Markdown der Chat-Antworten), ohne Browser (#1195, A8).
- name: JS-Tests
run: |
node tests/js/markdown.test.mjs
TZ=Europe/Berlin node tests/js/tabellen.test.mjs
TZ=Europe/Berlin node tests/js/polling.test.mjs
TZ=Europe/Berlin node tests/js/diagramm.test.mjs
- name: SDK-Tests
run: |
python3 -m venv .venv
.venv/bin/pip install -q openai
.venv/bin/python -m unittest discover -s tests/sdk