Soluzione .NET 10 con un solo pacchetto esterno (Npgsql): registri su file e in memoria senza simboli, impostazioni in una riga jsonb con conferma «DAL VIVO», migrazioni SQL incorporate e partizioni mensili per bids/resets/bot_decisions, coda di scrittura a lotti che regge il database assente. Kestrel serve la schermata d'errore di configurazione (il bot riprova ogni 30 s) oppure l'interfaccia protetta da UI_PASSWORD con cookie firmato e attese crescenti; /salute per il HEALTHCHECK. Dockerfile su Debian 13 con Chromium vero, entrypoint con PUID/PGID, compose di sviluppo con postgres:18, workflow di verifica e rilascio, template Unraid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
# Verifica a ogni push su main e a ogni pull request: compilazione con gli avvisi come
|
|
# errori e tutti i test, compresi quelli su PostgreSQL 18 (servizio del job).
|
|
#
|
|
# Serve un runner Linux con Docker e l'etichetta ubuntu-latest: se non c'è, il README
|
|
# (sezione «Sviluppo») spiega come registrarne uno su Unraid con gitea/act_runner.
|
|
name: Verifica
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: postgres:18
|
|
env:
|
|
POSTGRES_PASSWORD: test
|
|
POSTGRES_USER: admin
|
|
POSTGRES_DB: bidbot_test
|
|
ports: ["5432:5432"]
|
|
options: >-
|
|
--health-cmd "pg_isready -U admin -d bidbot_test"
|
|
--health-interval 5s
|
|
--health-retries 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '10.0.x'
|
|
|
|
- name: Compila
|
|
run: dotnet build BidooBidBot.sln -c Release --nologo
|
|
|
|
- name: Test
|
|
env:
|
|
TEST_DB_HOST: postgres
|
|
TEST_DB_USER: admin
|
|
TEST_DB_PASSWORD: test
|
|
TEST_DB_NAME: bidbot_test
|
|
run: >-
|
|
dotnet test tests/BidooBidBot.Tests -c Release --no-build --nologo
|
|
--logger "trx;LogFileName=risultati.trx" --results-directory out/test
|
|
|
|
- name: Risultati
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: risultati-test
|
|
path: out/test/*.trx
|
|
if-no-files-found: ignore
|