Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrations tests #44

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Integration Tests

on:
# if pushed directly to the master
push:
branches:
- master
- release/*
# on a pull request
pull_request:
branches:
- master
- release/*
jobs:
redis-cache:
name: Cache with Redis
runs-on: ubuntu-latest
# Docker Hub image that `container-job` executes in.
# Use -buster which comes with Git 2.20, because action/checkout needs Git 2.18+ to make correct clone (needed by Gradle version plugin)
container: node:12-buster
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11

- name: Check
uses: eskatos/gradle-command-action@v1
with:
arguments: check
env:
DSHACKLE_TEST_ENABLED: redis
REDIS_HOST: redis
REDIS_PORT: 6379


fake-upstream:
name: Test with fake upstream
runs-on: ubuntu-latest
# Use -buster which comes with Git 2.20, because action/checkout needs Git 2.18+ to make correct clone (needed by Gradle version plugin)
container: node:12-buster
services:

fake-upstream:
image: openjdk:11
volumes:
- ${{ github.workspace }}/testing/simple-upstream:/app
options: >-
--workdir /app
--entrypoint /app/start.sh

dshackle:
image: openjdk:11
volumes:
- ${{ github.workspace }}:/app
options: >-
--workdir /app
--entrypoint /app/testing/dshackle/start.sh

steps:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11

- name: Run trial
uses: eskatos/gradle-command-action@v1
with:
arguments: test
build-root-directory: ${{ github.workspace }}/testing/trial
38 changes: 6 additions & 32 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ on:
push:
branches:
- master
- release/*
# on a pull request
pull_request:

branches:
- master
- release/*
jobs:
unit-test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -27,34 +31,4 @@ jobs:
- name: Upload Coverage Report
uses: codecov/codecov-action@v1
with:
file: ./build/reports/jacoco/test/jacocoTestReport.xml

integration-test:
runs-on: ubuntu-latest
# Docker Hub image that `container-job` executes in.
# Use -buster which comes with Git 2.20, because action/checkout needs Git 2.18+ to make correct clone (needed by Gradle version plugin)
container: node:12-buster
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11

- name: Check
uses: eskatos/gradle-command-action@v1
with:
arguments: check
env:
DSHACKLE_TEST_ENABLED: redis
REDIS_HOST: redis
REDIS_PORT: 6379
file: ./build/reports/jacoco/test/jacocoTestReport.xml
6 changes: 6 additions & 0 deletions testing/dshackle/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh

set -e
cd ../..
export SPRING_APPLICATION_JSON='{"configPath": "testing/dshackle/dshackle.yaml"}'
./gradlew run
4 changes: 4 additions & 0 deletions testing/simple-upstream/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh

set -e
./gradlew run