Chocolatey Integration Tests #1455
This file contains hidden or 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
name: Chocolatey Integration Tests | |
on: | |
schedule: | |
# Run at 10:47pm, at a random minute to reduce load on GH Actions | |
- cron: '47 22 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# Build and test using mono on Ubuntu | |
ubuntu-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Cache Tools | |
uses: actions/cache@v4 | |
with: | |
path: tools | |
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }} | |
- name: Install Mono | |
run: | | |
sudo apt install ca-certificates gnupg | |
sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list | |
sudo apt update | |
sudo apt install -y mono-complete | |
mono --version | |
- name: Test with NUnit on Mono | |
run: | | |
chmod +x build.sh | |
$GITHUB_WORKSPACE//build.sh --verbosity=diagnostic --target=test --testExecutionType=all | |
- name: Upload Ubuntu build results | |
uses: actions/upload-artifact@v4 | |
# Always upload build results | |
if: ${{ always() }} | |
with: | |
name: ubuntu-build-results | |
path: | | |
code_drop/TestResults/issues-report.html | |
code_drop/TestResults/NUnit/TestResult.xml | |
code_drop/MsBuild.log | |
# Build and test on Windows | |
windows-build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Cache Tools | |
uses: actions/cache@v4 | |
with: | |
path: tools | |
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }} | |
- name: Test with NUnit on .Net Framework | |
run: .\build.bat --verbosity=diagnostic --target=test --testExecutionType=all --shouldRunOpenCover=false | |
- name: Upload Windows build results | |
uses: actions/upload-artifact@v4 | |
# Always upload build results | |
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 | |
# Build and test using mono on MacOS | |
macos-build: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Cache Tools | |
uses: actions/cache@v4 | |
with: | |
path: tools | |
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }} | |
- name: Test with NUnit on Mono | |
run: | | |
chmod +x build.sh | |
$GITHUB_WORKSPACE//build.sh --verbosity=diagnostic --target=test --testExecutionType=all | |
- name: Upload MacOS build results | |
uses: actions/upload-artifact@v4 | |
# Always upload build results | |
if: ${{ always() }} | |
with: | |
name: macos-build-results | |
path: | | |
code_drop/TestResults/issues-report.html | |
code_drop/TestResults/NUnit/TestResult.xml | |
code_drop/MsBuild.log |