Skip to content

Added test workflow. #4

Added test workflow.

Added test workflow. #4

Workflow file for this run

# 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: Build
env:
ARTIFACT: SAM
on:
workflow_call:
outputs:
artifact:
description: "The name of the artifact"
value: ${{ jobs.build.outputs.artifact }}
workflow_dispatch:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
jobs:
build:
runs-on: windows-latest
outputs:
artifact: ${{ steps.write_output.outputs.artifact }}
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore .\src\SAM.sln
- name: Publish
run: dotnet publish .\src\SAM\SAM.csproj -c Debug -a x86 -o publish
# - name: Test
# run: dotnet test --no-build --verbosity normal
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: ${{ env.ARTIFACT }}
path: publish
if-no-files-found: error
- id: write_output
name: Write Output
run: echo "artifact=${{ env.ARTIFACT }}.zip" >> $GITHUB_OUTPUT