-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (66 loc) · 1.72 KB
/
ci-server.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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
continue-on-error: true
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