Refs: #61 Oracle CommitStampStart recursion fix and add related tests #12
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: CI | |
| on: | |
| push: | |
| branches: ["master", "develop", "feature/**", "release/**", "hotfix/**"] | |
| tags: ["*"] | |
| pull_request: | |
| branches: ["master", "develop"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Keep the Windows build separate so we still validate the .NET Framework target | |
| # and the packaging prerequisites that only exist on Windows runners. | |
| build: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| submodules: recursive | |
| - name: Setup .NET SDKs | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.nuget/packages | |
| key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets', '.config/dotnet-tools.json') }} | |
| restore-keys: | | |
| nuget-${{ runner.os }}- | |
| - name: Restore .NET tools | |
| run: dotnet tool restore | |
| - name: Restore solution | |
| run: dotnet restore ./src/NEventStore.Persistence.Sql.Core.sln --verbosity m | |
| - name: Run GitVersion and patch assembly info | |
| id: gitversion | |
| shell: pwsh | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| $gitVersion = dotnet tool run dotnet-gitversion /targetpath "${{ github.workspace }}" /output json /updateAssemblyInfo | ConvertFrom-Json | |
| dotnet tool run dotnet-gitversion /targetpath "${{ github.workspace }}/dependencies/NEventStore" /updateAssemblyInfo | Out-Null | |
| "semver=$($gitVersion.SemVer)" >> $env:GITHUB_OUTPUT | |
| - name: Build solution | |
| run: dotnet build ./src/NEventStore.Persistence.Sql.Core.sln -c Release --no-restore /p:ContinuousIntegrationBuild=True | |
| # Tests run on Linux with database services (PostgreSQL, MySQL, SQLite). | |
| # Each database provider runs independently to isolate failures and validate | |
| # database-specific persistence logic. | |
| test-sql-databases: | |
| name: Test (Linux, ${{ matrix.db }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| db: | |
| - postgresql | |
| - mysql | |
| - sqlite | |
| - oracle | |
| services: | |
| postgresql: | |
| image: postgres:15-alpine | |
| env: | |
| POSTGRES_DB: NEventStore | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: Password12! | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| mysql: | |
| image: mysql:8 | |
| env: | |
| MYSQL_DATABASE: NEventStore | |
| MYSQL_ROOT_PASSWORD: Password12! | |
| options: >- | |
| --health-cmd "mysqladmin ping -h localhost" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 3306:3306 | |
| oracle: | |
| image: gvenzl/oracle-xe:latest | |
| env: | |
| ORACLE_ALLOW_REMOTE: true | |
| ORACLE_PASSWORD: Password12! | |
| options: >- | |
| --health-cmd "sqlplus -L -S / as sysdba @/dev/null" | |
| --health-interval 15s | |
| --health-timeout 10s | |
| --health-retries 10 | |
| ports: | |
| - 1521:1521 | |
| env: | |
| NEventStore.PostgreSql: Server=localhost;Database=NEventStore;Uid=postgres;Pwd=Password12!;Enlist=false; | |
| NEventStore.MySql: Server=localhost;Database=NEventStore;Uid=root;Pwd=Password12!;AutoEnlist=false; | |
| NEventStore.Sqlite: Data Source=:memory:;Cache=Shared; | |
| NEventStore.Oracle: Data Source=localhost:1521/XE;User Id=system;Password=Password12!;Persist Security Info=True; | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| submodules: recursive | |
| - name: Setup .NET SDKs | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.nuget/packages | |
| key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets', '.config/dotnet-tools.json') }} | |
| restore-keys: | | |
| nuget-${{ runner.os }}- | |
| - name: Run tests for ${{ matrix.db }} | |
| run: dotnet test ./src/NEventStore.Persistence.Sql.Core.sln -c Release --logger "trx;LogFileName=test-results-${{ matrix.db }}.trx" --filter "Category=${{ matrix.db }}" 2>&1 || true | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-results-${{ matrix.db }} | |
| path: "**/test-results-${{ matrix.db }}.trx" | |
| if-no-files-found: ignore | |
| retention-days: 14 |