|
16 | 16 | required: true |
17 | 17 | type: string |
18 | 18 | db-engine: |
19 | | - description: 'Database service required for this build: none, sqlserver, postgresql, mysql, mariadb, oracle, db2, clickhouse, firebird, vertica' |
| 19 | + description: 'Database service required for this build: none, sqlserver, postgresql, mysql, mariadb, oracle, db2, clickhouse, firebird, vertica, enterprisedb' |
20 | 20 | required: true |
21 | 21 | type: string |
22 | 22 |
|
|
48 | 48 | REPODB_FIREBIRD_CONSTR: "DataSource=127.0.0.1;Port=3050;Database=/firebird/data/repodb.fdb;User=SYSDBA;Password=RepoDB2026;Charset=UTF8;Pooling=false;" |
49 | 49 | # Vertica |
50 | 50 | REPODB_VERTICA_CONSTR: "Host=127.0.0.1;Port=5433;Database=RepoDb;User=dbadmin;Password=RepoDB2026;" |
| 51 | + # EnterpriseDB (EDB Postgres Advanced Server) |
| 52 | + REPODB_EDB_CONSTR_SYSTEM: "Server=127.0.0.1;Port=5444;Database=edb;User Id=enterprisedb;Password=RepoDB2026;" |
| 53 | + REPODB_EDB_CONSTR: "Server=127.0.0.1;Port=5444;Database=RepoDb;User Id=enterprisedb;Password=RepoDB2026;" |
51 | 54 |
|
52 | 55 | jobs: |
53 | 56 |
|
@@ -565,6 +568,81 @@ jobs: |
565 | 568 | name: ${{ inputs.artifact-name }} |
566 | 569 | path: release/*nupkg |
567 | 570 |
|
| 571 | + # EnterpriseDB (EDB Postgres Advanced Server) only (e.g. RepoDb.EnterpriseDb, RepoDb.EnterpriseDb.BulkOperations) |
| 572 | + build-enterprisedb: |
| 573 | + if: inputs.db-engine == 'enterprisedb' |
| 574 | + runs-on: ubuntu-latest |
| 575 | + |
| 576 | + services: |
| 577 | + enterprisedb: |
| 578 | + image: docker.enterprisedb.com/k8s/edb-postgres-advanced:18 |
| 579 | + # Official EDB image - the registry requires an EDB subscription. Configure the |
| 580 | + # EDB_DOCKER_USERNAME/EDB_DOCKER_PASSWORD repository secrets (see docker-compose.yml's |
| 581 | + # comment on the equivalent local service) before this job can pull it. |
| 582 | + credentials: |
| 583 | + username: ${{ secrets.EDB_DOCKER_USERNAME }} |
| 584 | + password: ${{ secrets.EDB_DOCKER_PASSWORD }} |
| 585 | + ports: |
| 586 | + - 127.0.0.1:5444:5444 |
| 587 | + env: |
| 588 | + ACCEPT_EULA: Y |
| 589 | + ENTERPRISEDB_PASSWORD: RepoDB2026 |
| 590 | + DATABASE_NAME: repodb |
| 591 | + |
| 592 | + steps: |
| 593 | + - name: Check out repository code |
| 594 | + uses: actions/checkout@v5 |
| 595 | + |
| 596 | + - name: Setup .NET Versions |
| 597 | + uses: actions/setup-dotnet@v5 |
| 598 | + with: |
| 599 | + dotnet-version: | |
| 600 | + 10.0.x |
| 601 | +
|
| 602 | + - name: Dotnet Build |
| 603 | + run: dotnet build -c release "${{ inputs.solution-dir }}/${{ inputs.solution-file }}" |
| 604 | + |
| 605 | + - name: Wait for EnterpriseDB service to be ready |
| 606 | + run: | |
| 607 | + CID=$(docker ps -q --filter "ancestor=docker.enterprisedb.com/k8s/edb-postgres-advanced:18") |
| 608 | + if [ -z "$CID" ]; then |
| 609 | + echo "Could not find the EnterpriseDB service container." |
| 610 | + exit 1 |
| 611 | + fi |
| 612 | + echo "EnterpriseDB container id: $CID" |
| 613 | + for i in $(seq 1 60); do |
| 614 | + if docker exec "$CID" pg_isready -h 127.0.0.1 -p 5444 -U enterprisedb > /dev/null 2>&1; then |
| 615 | + echo "EnterpriseDB is ready (after $((i * 5))s)." |
| 616 | + exit 0 |
| 617 | + fi |
| 618 | + echo "Waiting for EnterpriseDB to become ready... attempt $i/60" |
| 619 | + sleep 5 |
| 620 | + done |
| 621 | + echo "EnterpriseDB did not become ready within the timeout. Recent container logs:" |
| 622 | + docker logs "$CID" --tail 200 |
| 623 | + exit 1 |
| 624 | +
|
| 625 | + - name: Test for .NET 8.0 |
| 626 | + working-directory: ${{ inputs.solution-dir }} |
| 627 | + run: dotnet test -c release -f net8.0 --no-build ${{ inputs.solution-file }} |
| 628 | + |
| 629 | + - name: Test for .NET 9.0 |
| 630 | + working-directory: ${{ inputs.solution-dir }} |
| 631 | + run: dotnet test -c release -f net9.0 --no-build ${{ inputs.solution-file }} |
| 632 | + |
| 633 | + - name: Test for .NET 10.0 |
| 634 | + working-directory: ${{ inputs.solution-dir }} |
| 635 | + run: dotnet test -c release -f net10.0 --no-build -p:TestingPlatformDotnetTestSupport=true -p:TestingPlatformShowTestsFailure=true -p:TestingPlatformCaptureOutput=false ${{ inputs.solution-file }} |
| 636 | + |
| 637 | + - name: Run Dotnet Pack |
| 638 | + run: dotnet pack -c release -p Version="1.14.0-dev-${{ github.run_number }}" -o release "${{ inputs.solution-dir }}/${{ inputs.solution-file }}" |
| 639 | + |
| 640 | + - name: Package Nuget |
| 641 | + uses: actions/upload-artifact@v5 |
| 642 | + with: |
| 643 | + name: ${{ inputs.artifact-name }} |
| 644 | + path: release/*nupkg |
| 645 | + |
568 | 646 | # Vertica only (e.g. RepoDb.Vertica, RepoDb.Vertica.BulkOperations) |
569 | 647 | build-vertica: |
570 | 648 | if: inputs.db-engine == 'vertica' |
|
0 commit comments