Skip to content

ci: add automatic tests #1

ci: add automatic tests

ci: add automatic tests #1

Workflow file for this run

name: Test core
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:${{ vars.MONGO_VERSION }}
ports:
- 27017:27017
postgres:
image: cytomine/postgis:${{ vars.POSTGIS_VERSION }}
env:
POSTGRES_NAME: ${{ secrets.POSTGRES_DB }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
rabbitmq:
image: rabbitmq:${{ vars.RABBITMQ_VERSION }}
ports:
- 5672:5672
- 15672:15672
steps:
- name: Set up the repository
uses: actions/checkout@v3
- name: Set up JDK ${{ vars.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
distribution: ${{ vars.JAVA_DIST }}
java-version: ${{ vars.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: ${{ vars.GRADLE_VERSION }}
- name: Test core
run: ./gradlew :test --no-daemon