# 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: runs-on: docker steps: - name: Clone yavsc run: | cd "$RUNNER_WORKSPACE" git clone https://forgejo.pschneider.fr/notazof/yavsc.git _src cd _src if [ -n "${GITHUB_REF:-}" ]; then git fetch --depth 1 origin "$GITHUB_REF" git checkout FETCH_HEAD fi git submodule update --init --recursive --depth 1 - name: Restore dependencies working-directory: ${{ runner.workspace }}/_src run: dotnet restore - name: Build working-directory: ${{ runner.workspace }}/_src run: dotnet build --no-restore - name: Test working-directory: ${{ runner.workspace }}/_src run: dotnet test --no-build --verbosity normal