-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A work flow to run secondary configurations every night - currently o…
…nly MacOS (#267) * A workflow that can run secondary configurations. Currently just set to run MacOS but could also include other flavors of linux and some perf tests. This is meant to run on a schedule (nightly) and doesn't matter if files changed or not. * Just a comment change
- Loading branch information
Showing
1 changed file
with
100 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: Garnet Nightly Tests | ||
on: | ||
schedule: | ||
- cron: '0 7 * * *' # Runs at 07:00 UTC, which is 11:00 PM PST | ||
workflow_dispatch: | ||
|
||
env: | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_NOLOGO: true | ||
|
||
jobs: | ||
build-test-garnet: | ||
name: Garnet | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ macos-latest ] | ||
framework: [ 'net6.0', 'net8.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 | ||
with: | ||
dotnet-version: 8.0.x | ||
- 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: 30 | ||
- 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: [ macos-latest ] | ||
framework: [ 'net6.0', 'net8.0' ] | ||
configuration: [ 'Debug', 'Release' ] | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Set environment variable for Linux | ||
run: echo "RunAzureTests=yes" >> $GITHUB_ENV | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
- 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 | ||
with: | ||
dotnet-version: 8.0.x | ||
- 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: 30 | ||
- 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()) }} | ||
|