Skip to content

feat(snowflake): add coverage for all common and many exotic Snowflake data types #145

feat(snowflake): add coverage for all common and many exotic Snowflake data types

feat(snowflake): add coverage for all common and many exotic Snowflake data types #145

Workflow file for this run

name: CI
on: pull_request
jobs:
tests:
env:
PREEN_CONFIG_PATH: ./build/ci
PREEN_MODELS_PATH: ./build/ci/models
PG_USER: ${{ secrets.PG_USER }}
PG_PASSWORD: ${{ secrets.PG_PASSWORD }}
MYSQL_USER: ${{ secrets.MYSQL_USER }}
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
MONGO_USER: ${{ secrets.MONGO_USER }}
MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.0'
- name: Build Docker services (PG, MySQL, etc.)
run:
docker compose -f build/ci/docker-compose.yaml up -d
- name: Install dependencies
run: |
go mod tidy
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
args: --timeout=5m
- name: Build Preen binary
run: make build
- name: Unit Tests
run: make test
- name: Integration tests
run: |
sleep 5
bin/preen model build
# Test that the MySQL model was built and can be queried. Query should return 1 row.
MYSQL_RESULTS_LENGTH=$(bin/preen query -f json "select * from mysql_data_types_test;" | jq length)
if [[ $MYSQL_RESULTS_LENGTH -ne 1 ]]; then
echo "Expected 1 row in mysql_data_types_test, got $MYSQL_RESULTS_LENGTH"
exit 1
fi
# Test that the PostgreSQL model was built and can be queried. Query should return 1 row.
PG_RESULTS_LENGTH=$(bin/preen query -f json "select * from pg_data_types_test;" | jq length)
if [[ $PG_RESULTS_LENGTH -ne 1 ]]; then
echo "Expected 1 row in pg_data_types_test, got $PG_RESULTS_LENGTH"
exit 1
fi
- name: Shut down services
if: always()
run: docker compose -f build/ci/docker-compose.yaml down