yavsc/.forgejo/workflows/buildAndTest.yml

48 lines
1.3 KiB
YAML
Raw Normal View History

2026-02-02 00:39:06 +00:00
# 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:
2026-08-18 21:25:06 +01:00
branches: [ "main", "release/*" ]
2026-02-02 00:39:06 +00:00
jobs:
build:
2026-08-16 13:03:17 +01:00
runs-on: docker
2026-02-02 00:39:06 +00:00
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)"
2026-02-02 00:39:06 +00:00
- name: Restore dependencies
run: cd /src/_src && dotnet restore
2026-02-02 00:39:06 +00:00
- name: Build
run: cd /src/_src && dotnet build --no-restore
2026-02-02 00:39:06 +00:00
- name: Test
run: cd /src/_src && dotnet test --no-build --verbosity normal