64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
# if pushed directly
|
|
push:
|
|
branches:
|
|
- master
|
|
- release/*
|
|
# on a pull request
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- release/*
|
|
|
|
jobs:
|
|
unit-test:
|
|
runs-on: ubuntu-latest
|
|
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
|
|
|
|
- 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 |