yavsc/.forgejo/workflows/buildAndTest.yml

58 lines
1.5 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:
branches: [ "main" ]
jobs:
log-the-inputs:
runs-on: debian-latest
steps:
- run: |
echo "Log level: $LEVEL"
echo "Tags: $TAGS"
echo "Environment: $ENVIRONMENT"
env:
LEVEL: ${{ inputs.logLevel }}
TAGS: ${{ inputs.tags }}
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 "$RUNNER_WORKSPACE"
git clone --depth 1 --branch "${GITHUB_REF_NAME:-main}" \
https://forgejo.pschneider.fr/notazof/yavsc.git _src
cd _src
git submodule update --init --recursive --depth 1
2026-02-02 00:39:06 +00:00
- name: Restore dependencies
working-directory: ${{ runner.workspace }}/_src
2026-02-02 00:39:06 +00:00
run: dotnet restore
- name: Build
working-directory: ${{ runner.workspace }}/_src
2026-02-02 00:39:06 +00:00
run: dotnet build --no-restore
- name: Test
working-directory: ${{ runner.workspace }}/_src
2026-02-02 00:39:06 +00:00
run: dotnet test --no-build --verbosity normal