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