Add Periodic Ticker Support #527
Workflow file for this run
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: Run Build and Tests on Pull Request | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - net8 | |
| - net9 | |
| jobs: | |
| pr: | |
| name: PR Build and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Detect .NET version | |
| id: detect | |
| run: | | |
| DOTNET_VER=$(grep -oP '<TargetFramework>net\K[0-9]+' src/Directory.Build.props) | |
| echo "dotnet_version=${DOTNET_VER}.0.x" >> $GITHUB_OUTPUT | |
| if [ -f "TickerQ.slnx" ]; then | |
| echo "solution=TickerQ.slnx" >> $GITHUB_OUTPUT | |
| else | |
| echo "solution=TickerQ.sln" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Setup .NET SDKs | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ steps.detect.outputs.dotnet_version }} | |
| - name: Setup Node.js 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install frontend dependencies | |
| run: npm install | |
| working-directory: src/TickerQ.Dashboard/wwwroot | |
| - name: Build frontend | |
| run: npm run build | |
| working-directory: src/TickerQ.Dashboard/wwwroot | |
| - name: Build TickerQ.Utilities | |
| run: dotnet build src/TickerQ.Utilities/TickerQ.Utilities.csproj --configuration Release | |
| - name: Pack TickerQ.Utilities | |
| run: dotnet pack src/TickerQ.Utilities/TickerQ.Utilities.csproj --configuration Release --output ./nupkgs | |
| - name: Add local nupkgs source | |
| run: dotnet nuget add source "$(pwd)/nupkgs" --name LocalNupkgs | |
| - name: Restore packages with local source | |
| run: dotnet restore ${{ steps.detect.outputs.solution }} | |
| - name: Build TickerQ.SourceGenerator | |
| run: dotnet build src/TickerQ.SourceGenerator/TickerQ.SourceGenerator.csproj --configuration Release | |
| - name: Build other projects | |
| run: | | |
| dotnet build src/TickerQ/TickerQ.csproj --configuration Release | |
| dotnet build src/TickerQ.EntityFrameworkCore/TickerQ.EntityFrameworkCore.csproj --configuration Release | |
| dotnet build src/TickerQ.Dashboard/TickerQ.Dashboard.csproj --configuration Release | |
| dotnet build src/TickerQ.Instrumentation.OpenTelemetry/TickerQ.Instrumentation.OpenTelemetry.csproj --configuration Release | |
| dotnet build src/TickerQ.Caching.StackExchangeRedis/TickerQ.Caching.StackExchangeRedis.csproj --configuration Release | |
| dotnet build tests/TickerQ.Tests/TickerQ.Tests.csproj --configuration Release | |
| dotnet build tests/TickerQ.EntityFrameworkCore.Tests/TickerQ.EntityFrameworkCore.Tests.csproj --configuration Release | |
| dotnet build tests/TickerQ.Caching.StackExchangeRedis.Tests/TickerQ.Caching.StackExchangeRedis.Tests.csproj --configuration Release | |
| - name: Run tests | |
| run: | | |
| dotnet test tests/TickerQ.Tests/ --configuration Release --no-build | |
| dotnet test tests/TickerQ.EntityFrameworkCore.Tests/ --configuration Release --no-build | |
| dotnet test tests/TickerQ.Caching.StackExchangeRedis.Tests/ --configuration Release --no-build |