forked from opensearch-project/sql
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.53 KB
/
sql-pitest.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
name: SQL Plugin PiTest
on:
workflow_dispatch:
inputs:
name:
required: false
type: string
run-name:
${{ inputs.name == '' && format('{0} @ {1}', github.ref_name, github.sha) || inputs.name }}
jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
with:
product: opensearch
build-linux:
needs: Get-CI-Image-Tag
strategy:
matrix:
java:
- 11
- 17
runs-on: ubuntu-latest
container:
# using the same image which is used by opensearch-build team to build the OpenSearch Distribution
# this image tag is subject to change as more dependencies and updates will arrive over time
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
# need to switch to root so that github actions can install runner binary on container without permission issues.
options: --user root
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: PiTest with Gradle
run: |
chown -R 1000:1000 `pwd`
su `id -un 1000` -c "./gradlew --continue :core:pitest :opensearch:pitest"
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v2
with:
name: test-reports-${{ matrix.entry.java }}
path: |
core/build/reports/**
opensearch/build/reports/**