CI (Server) #234
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI (Server)" | |
on: | |
pull_request: | |
branches: | |
- main | |
- develop | |
types: | |
- opened | |
- synchronize | |
- reopened | |
push: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: | |
jobs: | |
unit-test: | |
name: Unit Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout@v4 | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: adopt | |
cache: gradle | |
timeout-minutes: 3 | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Test | |
run: ./gradlew unitTest | |
- name: Sonarqube analyze | |
env: | |
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: | | |
./gradlew sonar | |
integration-test: | |
name: Build on Cassandra | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
cassandra-version: [ '3.0', '3.5', '3.7', '3.9', '3.10', '3.11', '4.0', '4.1', '5.0' ] | |
fail-fast: false | |
steps: | |
- name: checkout@v4 | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: adopt | |
cache: gradle | |
timeout-minutes: 3 | |
- name: Use Cassandra ${{ matrix.cassandra-version }} | |
run: docker compose -f "docker/docker-compose-cassandra-${{ matrix.cassandra-version }}.yml" up -d --build --wait | |
timeout-minutes: 3 | |
- name: Test | |
run: ./gradlew integrationTest |