From 0c3e6f189254ce8cb18bd1cf60b67290cdfc8a05 Mon Sep 17 00:00:00 2001 From: SupaStuff Date: Sun, 31 Jan 2021 19:28:42 -0500 Subject: [PATCH] chore(CI): add pull request workflow --- .github/workflows/pull-request.yml | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..ece55ad --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,47 @@ +name: Item Tracker CI + +on: + pull_request: + branches: [ master ] + +env: + Project_Name: MHWItemBoxTracker + configuration: Debug + +defaults: + run: + shell: bash + + build: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.0.x + + - name: Setup MSBuild.exe + uses: microsoft/setup-msbuild@v1.0.2 + + # Restore the application to populate the obj folder with RuntimeIdentifiers + - name: Restore the applications + env: + NUGET_USERNAME: ${{ github.repository_owner }} + NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + shell: pwsh + run: | + cp .github/NuGet.Config . + msbuild -m /t:Restore + + - name: Execute unit tests + run: dotnet test + + # if I had tests, I probably wouldn't need to build... + - name: Build the apps + shell: pwsh + run: | + msbuild -m /p:"Configuration=$env:configuration,AssemblyVersionNumber=0.0.0.0"