-
Notifications
You must be signed in to change notification settings - Fork 20
39 lines (38 loc) · 1.24 KB
/
build.yaml
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
name: build
on: [push]
jobs:
build:
name: Build plugin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'gradle'
- name: Download opa
run: wget -O opa https://openpolicyagent.org/downloads/latest/opa_linux_amd64
- name: Install opa
run: sudo mv opa /usr/local/bin/ && sudo chmod +x /usr/local/bin/opa
- name: Test example rego
run: opa test ./src/main/rego/policy.rego ./src/test/rego/policy_test.rego
- name: Build plugin
run: ./gradlew check shadowJar
- name: Jacoco test report
run: ./gradlew jacocoTestReport
- uses: actions/upload-artifact@v1
with:
name: opa-authorizer
path: build/libs
- uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
files: ./build/reports/jacoco/test/jacocoTestReport.xml
name: opa-kafka-plugin
- uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
files: ./build/reports/opa/opa-codecov-coverage.json
name: opa-policies