-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (52 loc) · 2.76 KB
/
build.yml
File metadata and controls
62 lines (52 loc) · 2.76 KB
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
name: CI Build
on: [ push, pull_request ]
jobs:
build:
name: Build (JDK ${{ matrix.java }})
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17', '18' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: 'maven'
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Set up Etcd
run: |
curl -L https://github.com/etcd-io/etcd/releases/download/v3.6.7/etcd-v3.6.7-linux-amd64.tar.gz -o out.tar.gz
tar xvf out.tar.gz
rm -f out.tar.gz
./etcd-v3.6.7-linux-amd64/etcd > /dev/null 2>&1 &
./etcd-v3.6.7-linux-amd64/etcdctl put "cfg/string" "Hello World"
./etcd-v3.6.7-linux-amd64/etcdctl put "cfg/integer" "1"
./etcd-v3.6.7-linux-amd64/etcdctl put "cfg/intlist" "[1,2,3,4,5]"
./etcd-v3.6.7-linux-amd64/etcdctl put "cfg/boolean" "true"
./etcd-v3.6.7-linux-amd64/etcdctl put "cfg/file.test" "<FILE>./test;SGVsbG8gV29ybGQh"
echo -e "insecurepassword\ninsecurepassword" | ./etcd-v3.6.7-linux-amd64/etcdctl user add root
./etcd-v3.6.7-linux-amd64/etcdctl auth enable
- name: Set up Redis
run: |
sudo apt -y install redis-server
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
if: env.SONAR_TOKEN == ''
run: mvn --batch-mode --update-snapshots -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn test
# - name: Build and Analyse with Maven
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# if: env.SONAR_TOKEN != ''
# run: mvn --batch-mode --update-snapshots -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=voidframework_voidframework