From 5c19dba3c97eb8615a9b315dfc986146d9663ac0 Mon Sep 17 00:00:00 2001 From: Timothy Messier Date: Thu, 16 Feb 2023 14:37:48 -0500 Subject: [PATCH] ci(sqltest): Add github action workflow for sql tests (#2977) --- .github/workflows/test-sql.yml | 19 +++++++++++++++++++ internal/db/sqltest/Makefile | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-sql.yml diff --git a/.github/workflows/test-sql.yml b/.github/workflows/test-sql.yml new file mode 100644 index 0000000000..b4d519b7f8 --- /dev/null +++ b/.github/workflows/test-sql.yml @@ -0,0 +1,19 @@ +name: test-sql + +on: + - workflow_dispatch + - push + - workflow_call + +jobs: + test-sql: + runs-on: ${{ fromJSON(vars.RUNNER) }} + strategy: + matrix: + postgres-version: [ latest, 11-alpine, 12-alpine, 13-alpine, 14-alpine, 15-alpine ] + name: SQL Tests ${{ matrix.postgres-version }} + steps: + - uses: actions/checkout@v3 + - name: Run SQL PgTap Tests + run: | + make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=${{ matrix.postgres-version }} diff --git a/internal/db/sqltest/Makefile b/internal/db/sqltest/Makefile index 774f71e707..c813725bb1 100644 --- a/internal/db/sqltest/Makefile +++ b/internal/db/sqltest/Makefile @@ -53,7 +53,7 @@ test: -v "$(CWD)/../schema/migrations":/migrations \ -v "$(CWD)/initdb.d":/docker-entrypoint-initdb.d/ \ $(POSTGRES_DOCKER_IMAGE) - @docker run -it --rm \ + @docker run --rm \ --name test \ --link $(SQL_TEST_CONTAINER_NAME):db \ -e DATABASE=boundary \