-
Notifications
You must be signed in to change notification settings - Fork 56
82 lines (75 loc) · 2.69 KB
/
gradle.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
77
78
79
80
81
82
name: Java CI
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
build_rca_pkg:
strategy:
matrix:
java:
- 17
fail-fast: false
runs-on: [ubuntu-latest]
name: Building RCA package
steps:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{matrix.java}}
# RCA in ./tmp/performance-analyzer-rca
- name: Checkout RCA
uses: actions/checkout@v2
with:
path: ./tmp/performance-analyzer-rca
- name: Build RCA
working-directory: ./tmp/performance-analyzer-rca
run: ./gradlew build --stacktrace
- name: Upload reports
uses: actions/upload-artifact@v2
with:
name: gradle-reports
path: ./tmp/performance-analyzer-rca/build/reports
- name: Generate Jacoco coverage report
working-directory: ./tmp/performance-analyzer-rca
run: ./gradlew jacocoTestReport
- name: Upload coverage report
working-directory: ./tmp/performance-analyzer-rca
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash) -f ./build/reports/jacoco/test/jacocoTestReport.xml
- name: Publish RCA jar to maven local
working-directory: ./tmp/performance-analyzer-rca
run: ./gradlew publishToMavenLocal
# PA in ./tmp/performance-analyzer
- name: Checkout Performance Analyzer
uses: actions/checkout@v2
with:
repository: opensearch-project/performance-analyzer
ref: main
path: ./tmp/performance-analyzer
- name: Build PA gradle using the new RCA jar
working-directory: ./tmp/performance-analyzer
run: rm -f licenses/performanceanalyzer-rca-*.jar.sha1 licenses/performance-analyzer-commons-*.jar.sha1
- name: Update SHA
working-directory: ./tmp/performance-analyzer
run: ./gradlew updateShas
- name: Set docker-compose path
run: echo "DOCKER_COMPOSE_LOCATION=$(which docker-compose)" >> $GITHUB_ENV
# Set the vm.max_map_count system property to the minimum required to run OpenSearch
- name: Set vm.max_map_count
run: sudo sysctl -w vm.max_map_count=262144
- name: Build PA and run Unit Tests
working-directory: ./tmp/performance-analyzer
run: ./gradlew build
# Enable RCA for Integration Tests
- name: Spin up Docker cluster for integ testing
working-directory: ./tmp/performance-analyzer-rca
run: ./gradlew enableRca -Dbuild.docker_jdk_ver=${{matrix.java}}
# Run Integration Tests in PA
- name: Run integration tests
working-directory: ./tmp/performance-analyzer
run: ./gradlew integTest --info --stacktrace -Dtests.enableIT=true