Garnet Nightly Tests #679
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: Garnet Nightly Tests | |
| on: | |
| schedule: | |
| - cron: '0 9 * * *' # Runs at 09:00 UTC, which is 1:00 AM PST | |
| workflow_dispatch: | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
| DOTNET_NOLOGO: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-test-garnet: | |
| name: Garnet | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-22.04, ubuntu-24.04, windows-2022, windows-2025 ] | |
| framework: [ 'net8.0', 'net9.0' ] | |
| configuration: [ 'Debug', 'Release' ] | |
| test: [ 'Garnet.test', 'Garnet.test.cluster' ] | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| - name: Install dependencies | |
| run: dotnet restore | |
| - name: Check style format | |
| run: dotnet format --verify-no-changes --verbosity diagnostic | |
| - name: Build Garnet | |
| run: dotnet build --configuration ${{ matrix.configuration }} | |
| - name: Run tests ${{ matrix.test }} | |
| run: dotnet test test/${{ matrix.test }} -f ${{ matrix.framework }} --logger "console;verbosity=detailed" --logger trx --results-directory "GarnetTestResults-${{ matrix.os }}-${{ matrix.framework }}-${{ matrix.configuration }}-${{ matrix.test }}" | |
| timeout-minutes: 45 | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dotnet-garnet-results-${{ matrix.os }}-${{ matrix.framework }}-${{ matrix.configuration }}-${{ matrix.test }} | |
| path: GarnetTestResults-${{ matrix.os }}-${{ matrix.framework }}-${{ matrix.configuration }}-${{ matrix.test }} | |
| if: ${{ always() }} | |
| # Job to build and test Tsavorite code | |
| build-test-tsavorite: | |
| name: Tsavorite | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-22.04, ubuntu-24.04, windows-2022, windows-2025 ] | |
| framework: [ 'net8.0', 'net9.0' ] | |
| configuration: [ 'Debug', 'Release' ] | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set workaround for libaio on Ubuntu 24.04 (see https://askubuntu.com/questions/1512196/libaio1-on-noble/1512197#1512197) | |
| run: | | |
| sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1 | |
| if: ${{ matrix.os == 'ubuntu-24.04' }} | |
| - name: Set environment variable for Linux | |
| run: echo "RunAzureTests=yes" >> $GITHUB_ENV | |
| if: ${{ matrix.os == 'ubuntu-24.04' }} | |
| - name: Set environment variable for Windows | |
| run: echo ("RunAzureTests=yes") >> $env:GITHUB_ENV | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| - name: Setup Node.js for Azurite | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install and Run Azurite | |
| shell: bash | |
| run: | | |
| npm install -g azurite | |
| azurite & | |
| - name: Install dependencies | |
| run: dotnet restore | |
| - name: Format | |
| run: dotnet format --verify-no-changes --verbosity diagnostic | |
| - name: Build Tsavorite | |
| run: dotnet build libs/storage/Tsavorite/cs/test/Tsavorite.test.csproj --configuration ${{ matrix.configuration }} | |
| - name: Run Tsavorite tests | |
| run: dotnet test libs/storage/Tsavorite/cs/test/Tsavorite.test.csproj -f ${{ matrix.framework }} --logger "console;verbosity=detailed" --logger trx --results-directory "TsavoriteTestResults-${{ matrix.os }}-${{ matrix.framework }}-${{ matrix.configuration }}" | |
| timeout-minutes: 45 | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dotnet-tsavorite-results-${{ matrix.os }}-${{ matrix.framework }}-${{ matrix.configuration }} | |
| path: TsavoriteTestResults-${{ matrix.os }}-${{ matrix.framework }}-${{ matrix.configuration }} | |
| if: ${{ always() }} | |
| pipeline-success: | |
| name: Garnet Nightly (Complete) | |
| runs-on: ubuntu-latest | |
| needs: [ build-test-garnet, build-test-tsavorite ] | |
| steps: | |
| - run: echo Done! | |
| if: ${{ !(failure() || cancelled()) }} | |