mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-06 20:54:09 +01:00
Bumps the actions group with 2 updates in the / directory: [actions/setup-go](https://github.com/actions/setup-go) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/setup-go` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/b7ad1dad31e06c5925ef5d2fc7ad053ef454303e...d8cbb8045d7f43706b9177cceb36c1f91a6644d5) Updates `actions/download-artifact` from 7.0.0 to 8.0.2 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/37930b1c2abaa49bbe596cd826c3c89aef350131...9000827ccba6bdab643e8b6fd33ac0654aef8333) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: 8.0.2 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-go dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
151 lines
6.4 KiB
YAML
151 lines
6.4 KiB
YAML
# Pull Requests: Tests und Cross-Compile für alle Zielplattformen.
|
|
name: ci
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
# Neuer Push auf denselben PR: den alten Lauf abbrechen (spart Wartezeit)
|
|
concurrency:
|
|
group: ci-${{ github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30 # hängender Test bricht ab statt stundenlang zu laufen
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
|
with:
|
|
# neuester Patch von Go 1.27: Sicherheitskorrekturen der Standardbibliothek
|
|
go-version: "1.27.x"
|
|
check-latest: true
|
|
# zufällige Reihenfolge: Tests, die voneinander abhängen, fallen auf
|
|
# (bei Fehlern steht „-test.shuffle N“ im Protokoll zum Nachstellen)
|
|
- run: go vet ./... && go test -shuffle=on ./...
|
|
- name: Terminal-Emulator (eigene Kopie in third_party/vt)
|
|
run: cd third_party/vt && go test ./...
|
|
- name: ANSI-Parser (eigene Kopie in third_party/ansi)
|
|
run: cd third_party/ansi && go test ./...
|
|
- name: Lasttest mit 1000 Hosts
|
|
run: make loadtest
|
|
# Bildschirm-Tests: abweichende Bilder zum Ansehen hochladen
|
|
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
if: failure()
|
|
with:
|
|
name: golden-actual
|
|
path: internal/ui/testdata/golden-actual/
|
|
if-no-files-found: ignore
|
|
- name: Cross-Compile
|
|
run: |
|
|
for t in windows/arm64 windows/386 windows/amd64 darwin/arm64 darwin/amd64 linux/amd64 linux/arm64 linux/arm linux/riscv64; do
|
|
CGO_ENABLED=0 GOARM=7 GOOS=${t%/*} GOARCH=${t#*/} go build -o /dev/null ./cmd/sshtermy
|
|
done
|
|
# Zusehen im Browser (WebAssembly)
|
|
GOOS=js GOARCH=wasm go build -o /dev/null ./cmd/zusehen-wasm
|
|
|
|
# Datenrennen (Terminal-Emulator, Vermittler, SSH) früh finden
|
|
race:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30 # hängender Test bricht ab statt stundenlang zu laufen
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
|
with:
|
|
# neuester Patch von Go 1.27: Sicherheitskorrekturen der Standardbibliothek
|
|
go-version: "1.27.x"
|
|
check-latest: true
|
|
- run: go test -race ./...
|
|
|
|
# Statische Prüfung: tote Funktionen, veraltete APIs (z. B. Krypto), immer
|
|
# wahre Bedingungen. Abweichungen von der Vorgabe in staticcheck.conf.
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15 # hängender Test bricht ab statt stundenlang zu laufen
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
|
with:
|
|
go-version: "1.27.x"
|
|
check-latest: true
|
|
- run: go run honnef.co/go/tools/cmd/staticcheck@v0.8.2 ./...
|
|
- name: Bibliotheken aktuell? (nur Hinweis, Dependabot macht die PRs)
|
|
run: |
|
|
OUT="$(go list -m -u -f '{{if and .Update (not .Indirect)}}{{.Path}} {{.Version}} → {{.Update.Version}}{{end}}' all)"
|
|
[ -z "$OUT" ] || echo "::notice title=Neuere Bibliotheken::$(echo "$OUT" | tr '\n' ';')"
|
|
|
|
# Tests auch auf echtem Windows und macOS (ConPTY, DPAPI, Schlüsselbund, Pfade)
|
|
platforms:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 40 # hängender Test bricht ab statt stundenlang zu laufen
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
|
with:
|
|
go-version: "1.27.x"
|
|
check-latest: true
|
|
- run: go test ./...
|
|
- run: cd third_party/vt && go test ./...
|
|
- run: cd third_party/ansi && go test ./...
|
|
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
if: failure()
|
|
with:
|
|
name: golden-actual-${{ matrix.os }}
|
|
path: internal/ui/testdata/golden-actual/
|
|
if-no-files-found: ignore
|
|
|
|
# Bekannte Sicherheitslücken in Go und allen Bibliotheken, die wirklich aufgerufen werden
|
|
vuln:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10 # hängender Test bricht ab statt stundenlang zu laufen
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
|
with:
|
|
go-version: "1.27.x"
|
|
check-latest: true
|
|
- run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...
|
|
|
|
# Parser für Daten von fremden Geräten kurz mit Zufallsdaten beschießen
|
|
fuzz:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20 # hängender Test bricht ab statt stundenlang zu laufen
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
|
with:
|
|
go-version: "1.27.x"
|
|
check-latest: true
|
|
- run: FUZZTIME=15s tools/fuzz/run.sh
|
|
- name: ANSI-Parser (third_party/ansi)
|
|
run: cd third_party/ansi && go test -run '^$' -fuzz '^FuzzDecodeSequence$' -fuzztime 15s .
|
|
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
if: failure()
|
|
with:
|
|
name: fuzz-funde
|
|
path: internal/**/testdata/fuzz/
|
|
if-no-files-found: ignore
|
|
|
|
packaging:
|
|
# ubuntu-latest (26.04) holte apt-utils am 2026-11-11 stundenlang nur von
|
|
# security.ubuntu.com, das der Runner nicht auflösen konnte.
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 15 # Paketquellen können hängen
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
# Paketquellen können kurz nicht erreichbar sein (DNS beim Runner):
|
|
# Liste auffrischen und bis zu dreimal versuchen.
|
|
- run: |
|
|
if command -v apt-ftparchive >/dev/null && python3 -c 'import yaml' 2>/dev/null; then exit 0; fi
|
|
for i in 1 2 3; do
|
|
sudo apt-get update -qq || true
|
|
sudo apt-get install -y -qq apt-utils python3-yaml >/dev/null && exit 0
|
|
sleep $((i * 10))
|
|
done
|
|
exit 1
|
|
- run: packaging/check.sh
|