From 6ee93ee85488348f444af6bae9afa5b459d14156 Mon Sep 17 00:00:00 2001 From: FireMaskterK <20838718+FireMasterK@users.noreply.github.com> Date: Thu, 18 Nov 2021 09:12:21 +0000 Subject: [PATCH] Attempt to test h2 with docker-compose. --- .github/workflows/docker-build-test.yml | 9 +++++++-- api-test.sh => testing/api-test.sh | 0 testing/config.h2.properties | 18 ++++++++++++++++++ testing/docker-compose.h2.yml | 8 ++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) rename api-test.sh => testing/api-test.sh (100%) create mode 100644 testing/config.h2.properties create mode 100644 testing/docker-compose.h2.yml diff --git a/.github/workflows/docker-build-test.yml b/.github/workflows/docker-build-test.yml index f3ef9bd..df6f2a1 100644 --- a/.github/workflows/docker-build-test.yml +++ b/.github/workflows/docker-build-test.yml @@ -9,6 +9,11 @@ on: jobs: build-hotspot-test: runs-on: ubuntu-latest + strategy: + matrix: + docker-compose-file: + - docker-compose.yml + - testing/docker-compose.h2.yml steps: - uses: actions/checkout@v2.4.0 with: @@ -16,6 +21,6 @@ jobs: - name: Build Locally run: docker build . -t 1337kavin/piped:latest - name: Start Docker-Compose services - run: docker-compose up -d && sleep 5 + run: docker-compose -f ${{ matrix.docker-compose-file }} up -d && sleep 5 - name: Run tests - run: ./api-test.sh + run: ./testing/api-test.sh diff --git a/api-test.sh b/testing/api-test.sh similarity index 100% rename from api-test.sh rename to testing/api-test.sh diff --git a/testing/config.h2.properties b/testing/config.h2.properties new file mode 100644 index 0000000..4137c83 --- /dev/null +++ b/testing/config.h2.properties @@ -0,0 +1,18 @@ +# The port to Listen on. +PORT: 8080 + +# Proxy +PROXY_PART: https://pipedproxy-ams.kavin.rocks + +# Public API URL +API_URL: https://pipedapi.kavin.rocks + +# Public Frontend URL +FRONTEND_URL: https://piped.kavin.rocks + +# Hibernate properties +hibernate.connection.url: jdbc:h2:mem:test +hibernate.connection.driver_class: org.h2.Driver +hibernate.dialect: org.hibernate.dialect.H2Dialect +hibernate.connection.username: piped +hibernate.connection.password: changeme diff --git a/testing/docker-compose.h2.yml b/testing/docker-compose.h2.yml new file mode 100644 index 0000000..d4f28e9 --- /dev/null +++ b/testing/docker-compose.h2.yml @@ -0,0 +1,8 @@ +services: + piped: + image: 1337kavin/piped:latest + restart: unless-stopped + ports: + - "127.0.0.1:8080:8080" + volumes: + - ./config.h2.properties:/app/config.properties