From e0d3b916c7d4e0d7e5dfd85ca28db1707544bf9c Mon Sep 17 00:00:00 2001 From: AdmiringWorm Date: Tue, 16 Jan 2024 12:50:52 +0100 Subject: [PATCH] (#19) Add action to build project This adds a new GitHub workflow file to be able to build the project when a PR or a community member pushes up changes. This is to give a quicker indication on failures than having to look at our private builds (or a community member needing to reach out to a Chocolatey Team Member to check). The artifacts from the build (the extension/packages) themself are not included with this build as they won't be able to be ran on any systems. Only the unit tests can be ran as part of this workflow. --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..afcb40f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Chocolatey Community Validation Builds + +on: + # Trigger on pushes and pull requests + push: + pull_request: + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + # Build on Windows + windows-build: + runs-on: windows-2019 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Cache Tools + uses: actions/cache@v3.0.11 + with: + path: tools + key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }} + - name: Build with .NET Framework + run: ./build.ps1 --verbosity=diagnostic --target=CI --testExecutionType=unit --shouldRunOpenCover=false + - name: Upload Windows build results + uses: actions/upload-artifact@v3 + if: ${{ always() }} + with: + name: windows-build-results + path: | + code_drop\TestResults\issues-report.html + code_drop\TestResults\NUnit\TestResult.xml + code_drop\TestCoverage\lcov.info + code_drop\TestCoverage\OpenCover.xml + code_drop\MsBuild.log +# TODO: Add step to upload codecov results? \ No newline at end of file