added tests for the generated tests #20
This file contains 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: Test DBT package | |
on: | |
push: | |
branches: [ "main", "develop" ] | |
permissions: | |
contents: read | |
jobs: | |
test-duckdb: | |
name: Test on DuckDB | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: cd integration_tests/ | |
- name: pip install | |
run: pip install dbt-core duckdb dbt-duckdb | |
- name: Install DBT deps | |
run: dbt deps --target duckdb | |
- name: load test data | |
run: dbt seed --target duckdb | |
- name: Generate tests | |
run: dbt compile -q --inline "{{ testgen.get_test_suggestions(ref('users'), resource_type='seeds') }}" > seeds/users_test_suggestions.yml | |
- name: Generate tests | |
run: dbt compile -q --inline "{{ testgen.get_test_suggestions(ref('colnames_with_spaces'), resource_type='seeds') }}" > seeds/colnames_with_spaces_test_suggestions.yml | |
- name: dbt test | |
run: dbt test --target duckdb | |
test-postgres: | |
name: Test on Postgres | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: cd integration_tests/ | |
- name: pip install | |
run: pip install dbt-core duckdb dbt-postgres | |
- name: Install DBT deps | |
run: dbt deps --target postgres | |
- name: load test data | |
run: dbt seed --target postgres | |
- name: dbt test | |
run: dbt test --target postgres |