Skip to content

chore: remove software code #31

chore: remove software code

chore: remove software code #31

Workflow file for this run

name: Test core
on:
pull_request:
branches:
- main
jobs:
test-core:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:${{ vars.MONGO_VERSION }}
env:
MONGO_INITDB_DATABASE: ${{ secrets.MONGO_DB }}
MONGO_INITDB_ROOT_USERNAME: ${{ secrets.MONGO_USER }}
MONGO_INITDB_ROOT_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
ports:
- 27017:27017
postgres:
image: cytomineuliege/postgis:${{ vars.POSTGRES_DB_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: |
sed -i -- "s/name=\"be.cytomine\" level=\"debug\"/name=\"be.cytomine\" level=\"info\"/g" src/test/resources/logback-test.xml
./gradlew :test --no-daemon
- name: Upload test reports
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: reports
path: build/reports/
retention-days: 30
- name: Upload test results
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: test-results
path: build/test-results/
retention-days: 30
- name: Upload Java Code Coverage (JaCoCo)
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: jacoco
path: build/jacoco/
retention-days: 30