WolverineFx.Http.Grpc — gRPC Support for Wolverine HTTP Endpoints #357
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: persistence | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| config: Release | |
| disable_test_parallelization: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET 8 | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Setup .NET 9 | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Start containers | |
| run: docker compose up -d postgresql sqlserver mysql rabbitmq | |
| - name: Build | |
| run: | | |
| dotnet build src/Persistence/PersistenceTests/PersistenceTests.csproj --configuration ${{ env.config }} --framework net9.0 | |
| dotnet build src/Persistence/PostgresqlTests/PostgresqlTests.csproj --configuration ${{ env.config }} --framework net10.0 | |
| dotnet build src/Persistence/SqlServerTests/SqlServerTests.csproj --configuration ${{ env.config }} --framework net10.0 | |
| dotnet build src/Persistence/MySql/MySqlTests/MySqlTests.csproj --configuration ${{ env.config }} --framework net10.0 | |
| dotnet build src/Persistence/SqliteTests/SqliteTests.csproj --configuration ${{ env.config }} --framework net10.0 | |
| - name: Wait for PostgreSQL | |
| run: | | |
| echo "Waiting for PostgreSQL to be ready..." | |
| for i in {1..30}; do | |
| if docker compose exec -T postgresql pg_isready -U postgres; then | |
| echo "PostgreSQL is ready" | |
| break | |
| fi | |
| echo "Attempt $i: PostgreSQL not ready yet, waiting..." | |
| sleep 2 | |
| done | |
| - name: Wait for MySQL | |
| run: | | |
| echo "Waiting for MySQL to be ready..." | |
| for i in {1..30}; do | |
| if docker compose exec -T mysql mysqladmin ping -h localhost -u root -pP@55w0rd --silent; then | |
| echo "MySQL is ready" | |
| break | |
| fi | |
| echo "Attempt $i: MySQL not ready yet, waiting..." | |
| sleep 2 | |
| done | |
| - name: Wait for RabbitMQ | |
| run: | | |
| echo "Waiting for RabbitMQ to be ready..." | |
| for i in {1..30}; do | |
| if docker compose exec -T rabbitmq rabbitmq-diagnostics -q ping; then | |
| echo "RabbitMQ is ready" | |
| break | |
| fi | |
| echo "Attempt $i: RabbitMQ not ready yet, waiting..." | |
| sleep 2 | |
| done | |
| - name: Test SqliteTests | |
| run: dotnet test src/Persistence/SqliteTests/SqliteTests.csproj --configuration ${{ env.config }} --framework net10.0 --no-build --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" | |
| - name: Test MySqlTests | |
| run: dotnet test src/Persistence/MySql/MySqlTests/MySqlTests.csproj --configuration ${{ env.config }} --framework net10.0 --no-build --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" | |
| - name: Test PersistenceTests | |
| run: dotnet test src/Persistence/PersistenceTests/PersistenceTests.csproj --configuration ${{ env.config }} --framework net9.0 --no-build --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" | |
| - name: Wait for SQL Server | |
| run: | | |
| echo "Waiting for SQL Server to be ready..." | |
| for i in {1..30}; do | |
| if docker compose exec -T sqlserver /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'P@55w0rd' -C -Q "SELECT 1" > /dev/null 2>&1; then | |
| echo "SQL Server is ready" | |
| break | |
| fi | |
| echo "Attempt $i: SQL Server not ready yet, waiting..." | |
| sleep 2 | |
| done | |
| - name: Test SqlServerTests | |
| run: dotnet test src/Persistence/SqlServerTests/SqlServerTests.csproj --configuration ${{ env.config }} --framework net10.0 --no-build --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" | |
| - name: Test PostgresqlTests | |
| run: dotnet test src/Persistence/PostgresqlTests/PostgresqlTests.csproj --configuration ${{ env.config }} --framework net10.0 --no-build --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" | |
| - name: Stop containers | |
| if: always() | |
| run: docker compose down |