yavsc/.forgejo/workflows/buildAndTest.yml
Workflow config file is invalid. Please check your config file: Line: 28 Column 5: Failed to match job-factory: Line: 59 Column 7: Failed to match run-step: Line: 60 Column 7: Unknown Property artifacts Line: 59 Column 7: Failed to match regular-step: Line: 60 Column 7: Unknown Property artifacts Line: 64 Column 7: Unknown Property run Line: 28 Column 5: Failed to match workflow-job: Line: 31 Column 5: Unknown Property steps Forgejo Actions YAML Schema validation error
Paul Schneider f7760c5be4
Some checks failed
Dotnet build and test / build (pull_request) Successful in 32m17s
Dotnet build and test / build (push) Has been cancelled
Forgejo Release / release (push) Failing after 30s
should fixe the CI
2026-09-27 03:44:34 +01:00

77 lines
2.5 KiB
YAML

# 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", "release/*", "hotfix/*", "fix/*" ]
pull_request:
branches: [ "main", "release/*", "hotfix/*", "fix/*" ]
jobs:
build:
runs-on: docker
container:
image: pazof/yavsc-build-env:debian13-dotnet10-android36-jdk21-v2
steps:
- name: Clone yavsc
run: |
set -e
cd /src
git clone "${FORGEJO_SERVER_URL}/${FORGEJO_REPOSITORY}.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: Secret scan
run: |
echo "🔍 Scanning for secrets..."
cd /src/_src && dotnet tool restore && dotnet picket git --verbose --redact --exit-code 1 --log-opts main..HEAD \
- name: Build
run: |
echo "🏗️ Building the solution..."
cd /src/_src && dotnet build --verbosity normal
- name: install dependencies
run: |
echo "📦 Installing dependencies..."
apt install -y texlive-binaries texlive-luatex texlive-pictures \
texlive-fonts-extra texlive-lang-french texlive-lang-english \
texlive-lang-portuguese texlive-lang-spanish \
texlive-latex-recommended texlive-latex-extra
- name: Test
artifacts:
name: test-results
path: test-results.html
run: |
echo "🚀 Lancement des tests..."
cd /src/_src && dotnet test \
--report-xunit \
--report-xunit-html \
--report-xunit-html-filename "test-results.html"
TEST_EXIT_CODE=$?
echo "Test exit code: $TEST_EXIT_CODE"
if [ $TEST_EXIT_CODE -ne 0 ]; then
echo "❌ Tests failed with exit code $TEST_EXIT_CODE"
exit $TEST_EXIT_CODE
else
echo "✅ All tests passed successfully."
fi