forked from opensearch-project/security
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (56 loc) · 1.46 KB
/
ci.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
name: CI
on:
pull_request:
branches:
- '*'
push:
branches:
- main
- opendistro-*
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 14.0.x
- name: Checkout security
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: java
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Checkout OpenSearch
uses: actions/checkout@v2
with:
repository: 'opensearch-project/OpenSearch'
path: OpenSearch
ref: '1.1'
- name: Build OpenSearch
working-directory: ./OpenSearch
run: ./gradlew publishToMavenLocal
- name: Checkstyle
run: mvn -B checkstyle:checkstyle
- name: Package
run: mvn -B clean package -Padvanced -DskipTests
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Test
run: OPENDISTRO_SECURITY_TEST_OPENSSL_OPT=true mvn -B test
- name: Coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: artifacts
path: target/releases/