Skip to content

Memory storage

Memory storage #234

Workflow file for this run

name: Java CI
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
java: [ '8', '11', '17']
name: JDK ${{ matrix.Java }} build
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps port 6379 on service container to the host
- 6379:6379
steps:
- uses: actions/[email protected]
- name: Set up Java
uses: actions/[email protected]
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: gradle
- name: Before Script
run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter && chmod +x ./cc-test-reporter && ./cc-test-reporter before-build
- name: Validate Gradle wrapper
uses: gradle/[email protected]
- name: Build with Gradle headless
uses: coactions/[email protected]
with:
run: ./gradlew clean build jacocoTestReport
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Test & publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: 430594ee361ff2e93ebf0a942f639b8092c6f17b7c5098f9c75abc404311dfc7
JACOCO_SOURCE_PATH: "${{github.workspace}}/src/main/java"
with:
coverageLocations: ${{github.workspace}}/build/reports/jacoco/test/jacocoTestReport.xml:jacoco