# This workflow will build a .NET project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net name: Dotnet build and test on: workflow_dispatch: inputs: logLevel: description: 'Log level' required: true default: 'warning' type: choice options: - info - warning - debug tags: description: 'Test scenario tags' required: false type: boolean push: branches: [ "main" ] pull_request: branches: [ "main", "release/*" ] jobs: build: runs-on: docker steps: - name: Clone yavsc run: | cd /src git clone https://forgejo.pschneider.fr/notazof/yavsc.git _src cd _src if [ -n "${GITHUB_REF:-}" ]; then git fetch origin "$GITHUB_REF" git checkout FETCH_HEAD fi git submodule update --init --recursive echo "✅ Checked out at $(git rev-parse HEAD) on $(git branch --show-current 2>/dev/null || echo detached HEAD)" - name: Démarrer l'émulateur QEMU Headless run: | set -e export ANDROID_AVD_HOME=${ANDROID_HOME}/.android/avd adb start-server echo "⌛ Démarrage de l'émulateur en tâche de fond..." emulator -avd pixel_test \ -no-window \ -no-audio \ -no-boot-anim \ -gpu off & EMU_PID=$! echo "Attente de la détection par ADB..." adb wait-for-device echo "Attente de la fin du boot d'Android..." OUT="" while [[ "$OUT" != "1" ]]; do sleep 5 OUT=$(adb shell getprop sys.boot_completed | tr -d '\r') echo "Statut actuel : ${OUT:-0}" done echo "✅ L'émulateur Android est prêt !" - name: Test run: | echo "⌛ Lancement des tests..." cd /src/_src && dotnet test --verbosity normal && echo "✅ Success !"