Conductor Protocol Fix #2616
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 Unit Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/* | |
| pull_request: | |
| branches: | |
| - main | |
| - release/* | |
| types: | |
| - ready_for_review | |
| - opened | |
| - reopened | |
| - synchronize | |
| workflow_dispatch: | |
| jobs: | |
| integration: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| dbos-database: ['SQLITE', 'POSTGRES'] | |
| services: | |
| # Postgres service container | |
| postgres: | |
| image: sibedge/postgres-plv8 | |
| env: | |
| # Specify the password for Postgres superuser. | |
| POSTGRES_PASSWORD: a!b@c$d()e*_,/:;=?@ff[]22 | |
| # Set health checks to wait until postgres has started | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| # Maps tcp port 5432 on service container to the host | |
| - 5432:5432 | |
| # Kafka service container | |
| kafka: | |
| image: apache/kafka:latest | |
| ports: | |
| - 9092:9092 | |
| env: | |
| KAFKA_NODE_ID: 1 | |
| KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093 | |
| KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://127.0.0.1:9092 | |
| KAFKA_PROCESS_ROLES: broker,controller | |
| KAFKA_CONTROLLER_QUORUM_VOTERS: 1@localhost:9093 | |
| KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER | |
| KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT | |
| KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | |
| KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 | |
| KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 | |
| CLUSTER_ID: MkU3OEVBNTcwNTJENDM2Qk | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Setup PDM | |
| uses: pdm-project/setup-pdm@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: 'x64' | |
| - name: Install Dependencies | |
| run: pdm install | |
| working-directory: ./ | |
| # Mypy is the main type-checker used to verify the entire code base. | |
| - name: Check Types | |
| run: pdm run mypy . | |
| working-directory: ./ | |
| # Pyright is used by Pylance, so verify it works with DBOS application code. | |
| - name: Check Types With Pyright | |
| run: pdm run pyright tests -p pyrightconfig.test.json | |
| working-directory: ./ | |
| - name: Run Unit Tests | |
| run: pdm run pytest tests | |
| working-directory: ./ | |
| timeout-minutes: 30 | |
| env: | |
| PGPASSWORD: a!b@c$d()e*_,/:;=?@ff[]22 | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DBOS_DATABASE: ${{ matrix.dbos-database }} |