-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (63 loc) · 1.8 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
72
73
74
75
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# When a new revision is pushed to a PR, cancel all in-progress CI runs for that
# PR. See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
checks: write
jobs:
prepare-testsuite:
runs-on: ubuntu-latest
steps:
- name: Checkout OPA
uses: actions/checkout@v4
with:
repository: open-policy-agent/opa
ref: main
# ref: v0.67.1
path: opa
- name: Prep OPA cases
working-directory: opa
run: WASM_BUILD_ONLY=true make wasm-rego-test
- uses: actions/upload-artifact@v4
with:
name: testcases
path: opa/.go/cache/testcases.tar.gz
build:
needs: prepare-testsuite
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java-version: [11, 17, 21]
opa-version:
- 0.67.1 # latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: testcases
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '${{ matrix.java-version }}'
cache: maven
- name: Install Open Policy Agent v${{ matrix.opa-version }}
uses: open-policy-agent/setup-opa@v2
with:
version: ${{ matrix.opa-version }}
- name: Test OPA-Chicory
run: mvn -B spotless:apply clean install
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/target/surefire-reports/TEST-*.xml'