Added test workflow. #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |