Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
# Verifica a ogni push e a ogni pull request: compilazione con gli avvisi come errori
|
|
# (compreso Febe.Desktop, che si compila anche da Linux) e tutte le prove.
|
|
# Le prove che richiedono Chromium e Xvfb si saltano da sole se il runner non li ha.
|
|
#
|
|
# Runner: act_runner con l'etichetta ubuntu-latest.
|
|
name: verifica
|
|
|
|
on:
|
|
push:
|
|
branches: [main, febe-v1]
|
|
pull_request:
|
|
|
|
jobs:
|
|
prove:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: "10.0.x"
|
|
|
|
- name: Compilazione (avvisi = errori)
|
|
run: dotnet build Febe.slnx -c Release -nologo -warnaserror
|
|
|
|
- name: Prove
|
|
run: >-
|
|
dotnet test tests/Febe.Tests -c Release --no-build --nologo
|
|
--logger "trx;LogFileName=prove.trx" --results-directory out/prove
|
|
|
|
- name: Risultati
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: risultati-prove
|
|
path: out/prove/*.trx
|
|
if-no-files-found: ignore
|
|
|
|
immagine:
|
|
runs-on: ubuntu-latest
|
|
needs: prove
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Costruzione dell'immagine Docker (senza pubblicarla; le prove girano anche dentro la build)
|
|
run: |
|
|
docker version
|
|
docker build -f docker/Dockerfile \
|
|
--build-arg VERSION=ci \
|
|
--build-arg GIT_COMMIT="${GITHUB_SHA::12}" \
|
|
-t febe:ci .
|
|
|
|
- name: L'immagine parte e mostra la pagina di errore senza password
|
|
run: |
|
|
docker run --rm --entrypoint /usr/bin/chromium febe:ci --version
|
|
docker run --rm --entrypoint sh febe:ci -c 'locale -a | grep -i it_IT && ls /etc/chromium/policies/managed/'
|