diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 00000000000..32257ed1fb1 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,48 @@ +name: Build and Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build and Test + run: | + export DISPLAY=:99 + sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & + mvn \ + clean verify -B -V \ + -Dmaven.test.failure.ignore=true \ + -DexcludedGroups=flakyTest,slowTest \ + -P baseline-compare-and-replace \ + -Ddsf.gdb.tests.timeout.multiplier=50 \ + -Dindexer.timeout=300 + - name: Upload Logs + uses: actions/upload-artifact@v3 + if: success() || failure() + with: + name: Code Cleanliness Detailed Logs + path: '*.log' + - name: Upload Test Results + uses: actions/upload-artifact@v3 + if: success() || failure() + with: + name: test-results + path: | + */*/target/surefire-reports/*.xml + terminal/plugins/org.eclipse.tm.terminal.test/target/surefire-reports/*.xml diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml new file mode 100644 index 00000000000..aa5c850ad30 --- /dev/null +++ b/.github/workflows/report.yml @@ -0,0 +1,36 @@ +name: Unit Test Results + +on: + workflow_run: + workflows: ["Build and Test"] + types: + - completed + +jobs: + unit-test-results: + name: Unit Test Results + runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion != 'skipped' + + steps: + - name: Download Test Report + uses: dawidd6/action-download-artifact@v2 + with: + name: test-results + path: test-results + workflow: ${{ github.event.workflow.id }} + run_id: ${{ github.event.workflow_run.id }} + - name: Publish Test Report as GitHub PR Comment + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() + with: + commit: ${{ github.event.workflow_run.head_sha }} + junit_files: "test-results/**/*.xml" + - name: Publish Test Report in GitHub Actions UI + uses: mikepenz/action-junit-report@v3 + with: + commit: ${{github.event.workflow_run.head_sha}} + report_paths: 'test-results/**/*.xml' + fail_on_failure: true + require_tests: true + check_name: Test Results