| on: [push, pull_request] |
| name: Tests |
| jobs: |
| test: |
| strategy: |
| fail-fast: false |
| matrix: |
| go_version: [1.13, 1.14] |
| database_image: |
| - boostport/hbase-phoenix-all-in-one:1.3-4.13 |
| - boostport/hbase-phoenix-all-in-one:1.4-4.14 |
| - boostport/hbase-phoenix-all-in-one:2.0-5.0 |
| - f21global/calcite-avatica:1.11.0-hypersql |
| - f21global/calcite-avatica:1.12.0-hypersql |
| - apache/calcite-avatica-hypersql:1.13.0 |
| - apache/calcite-avatica-hypersql:1.14.0 |
| - apache/calcite-avatica-hypersql:1.15.0 |
| |
| runs-on: ubuntu-latest |
| |
| steps: |
| - name: Set up go |
| uses: actions/setup-go@v2-beta |
| with: |
| go-version: ${{ matrix.go_version}} |
| |
| - name: Check out Avatica-Go repository |
| uses: actions/checkout@v2 |
| |
| - name: Run tests |
| env: |
| PHOENIX_HOST: http://localhost:8765 |
| HSQLDB_HOST: http://localhost:8765 |
| DATABASE_IMAGE: ${{ matrix.database_image }} |
| run: | |
| case "$DATABASE_IMAGE" in |
| *phoenix*) |
| docker run -d -p 8765:8765 $DATABASE_IMAGE |
| export AVATICA_FLAVOR=PHOENIX |
| ;; |
| *hypersql*) |
| docker run -d -p 8765:8765 $DATABASE_IMAGE -u jdbc:hsqldb:mem:public |
| export AVATICA_FLAVOR=HSQLDB |
| ;; |
| esac |
| |
| go test -v ./... |