Skip to content

Commit

Permalink
Move PiTest to a new workflow. (#1285)
Browse files Browse the repository at this point in the history
* Move PiTest to a new workflow. Minor fixes in the build workflow.

Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand authored Jan 20, 2023
1 parent 6a90fe6 commit 13faca4
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 9 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/sql-pitest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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:
build:
strategy:
matrix:
java:
- 11
- 17
runs-on: ubuntu-latest

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: |
./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/**
14 changes: 6 additions & 8 deletions .github/workflows/sql-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ jobs:
- name: Build with Gradle
run: ./gradlew --continue build ${{ matrix.entry.os_build_args }}

- name: PiTest with Gradle
run: |
./gradlew :core:pitest
./gradlew :opensearch:pitest

- name: Run backward compatibility tests
if: ${{ matrix.entry.os == 'ubuntu-latest' }}
run: ./scripts/bwctest.sh
Expand All @@ -63,22 +57,24 @@ jobs:
- name: Upload SQL Coverage Report
if: ${{ always() && matrix.entry.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v3
continue-on-error: true
with:
flags: sql-engine
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload Artifacts
uses: actions/upload-artifact@v2
continue-on-error: true
with:
name: opensearch-sql-${{ matrix.entry.os }}
name: opensearch-sql-${{ matrix.entry.os }}-${{ matrix.entry.java }}
path: opensearch-sql-builds

- name: Upload test reports
if: ${{ always() && matrix.entry.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2
continue-on-error: true
with:
name: test-reports
name: test-reports-${{ matrix.entry.os }}-${{ matrix.entry.java }}
path: |
sql/build/reports/**
ppl/build/reports/**
Expand All @@ -89,3 +85,5 @@ jobs:
protocol/build/reports/**
legacy/build/reports/**
plugin/build/reports/**
doctest/build/testclusters/docTestCluster-0/logs/*
integ-test/build/testclusters/*/logs/*
4 changes: 3 additions & 1 deletion .github/workflows/sql-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v2
with:
name: test-reports
name: test-reports-${{ matrix.entry.java }}
path: |
sql/build/reports/**
ppl/build/reports/**
Expand All @@ -93,3 +93,5 @@ jobs:
protocol/build/reports/**
legacy/build/reports/**
plugin/build/reports/**
doctest/build/testclusters/docTestCluster-0/logs/*
integ-test/build/testclusters/*/logs/*

0 comments on commit 13faca4

Please sign in to comment.