-
Notifications
You must be signed in to change notification settings - Fork 4
Adding custom & s3 tests infrastructure #457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
ed53c99
a05fab6
fddceff
26d039c
cd894dd
7b1f1f0
277aea7
4fc6a2f
dce5428
1af103d
2ee3a34
5680d1f
78fb6e5
447fcb4
654b105
cf2aac2
f116a22
10b2e23
68e2139
47fef7f
25e1474
fa6f4d1
339d1a5
8996c48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| name: Run Custom Tests All dialects | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| python-versions: | ||
| description: "JSON string of Python versions" | ||
| type: string | ||
| required: true | ||
| secrets: | ||
| READ_LLM_FIXTURES_ROLE: | ||
| required: true | ||
| SF_USERNAME: | ||
| required: true | ||
| SF_PASSWORD: | ||
| required: true | ||
| SF_ACCOUNT: | ||
| required: true | ||
| MYSQL_USERNAME: | ||
| required: true | ||
| MYSQL_PASSWORD: | ||
| required: true | ||
| POSTGRES_USER: | ||
| required: true | ||
| POSTGRES_PASSWORD: | ||
| required: true | ||
|
|
||
| jobs: | ||
| custom-tests: | ||
| name: Custom Tests (Python ${{ matrix.python-version }}) | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| strategy: | ||
| matrix: | ||
| python-version: ${{ fromJSON(inputs.python-versions) }} | ||
|
|
||
| # Define services here to run Docker containers alongside your job | ||
| services: | ||
| mysql: | ||
| image: bodoai1/pydough-mysql-tpch:latest | ||
| env: | ||
| # Set environment variables for MySQL container | ||
| MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_PASSWORD }} | ||
| MYSQL_DATABASE: tpch | ||
| ports: | ||
| - 3306:3306 | ||
|
|
||
| postgres: | ||
| image: bodoai1/pydough-postgres-tpch:latest | ||
| env: | ||
| # Set environment variables for Postgres container | ||
| POSTGRES_USER: ${{ secrets.POSTGRES_USER }} | ||
| POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | ||
| POSTGRES_DB: "pydough_test" | ||
| ports: | ||
| - 5432:5432 | ||
| env: | ||
| # MYSQL env | ||
| MYSQL_USERNAME: ${{ secrets.MYSQL_USERNAME }} | ||
| MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }} | ||
| MYSQL_DATABASE: tpch | ||
| MYSQL_HOST: 127.0.0.1 | ||
| # POSTGRES env | ||
| POSTGRES_USER: ${{ secrets.POSTGRES_USER }} | ||
| POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | ||
| POSTGRES_DB: pydough_test | ||
| POSTGRES_HOST: 127.0.0.1 | ||
| # SNOWFLAKE env | ||
| SF_USERNAME: ${{ secrets.SF_USERNAME }} | ||
| SF_PASSWORD: ${{ secrets.SF_PASSWORD }} | ||
| SF_ACCOUNT: ${{ secrets.SF_ACCOUNT }} | ||
|
|
||
| steps: | ||
| - name: Configure AWS Credentials (OIDC) | ||
| uses: aws-actions/configure-aws-credentials@v4 | ||
| with: | ||
| role-to-assume: ${{ secrets.READ_LLM_FIXTURES_ROLE }} | ||
| aws-region: us-east-2 | ||
|
|
||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Python ${{ matrix.python-version }} | ||
| id: setup-python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v3 | ||
| with: | ||
| version: "0.4.23" | ||
|
|
||
| - name: Create virtual environment | ||
| run: uv venv | ||
|
|
||
| - name: Install dependencies | ||
| run: uv pip install -e ".[boto3, snowflake, mysql, postgres]" | ||
|
|
||
| - name: Confirm all connectors are installed | ||
| run: uv run python -c "import boto3; import mysql.connector; import snowflake.connector; import psycopg2; print('All connectors installed')" | ||
|
|
||
| - name: Run Custom Tests for all dialects | ||
| run: uv run pytest -m custom tests/ -rs |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,3 +6,4 @@ markers = | |
| postgres: marks tests that require PostgresSQL credentials | ||
| server: marks tests that require api mock server | ||
| sf_masked: marks tests that require Snowflake Masked credentials | ||
| custom: marks tests that require custom datasets from s3 | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be part of the
dev-dependencies.It's only used in testing, not related to any PyDough functionality.