Skip to content

Install OneAPi Test #32

Install OneAPi Test

Install OneAPi Test #32

Workflow file for this run

#-------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#-------------------------------------------------------------
name: Java Test
on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
- '*.html'
- 'src/main/python/**'
- 'dev/**'
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
- '*.html'
- 'src/main/python/**'
- 'dev/**'
branches:
- main
jobs:
java_tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
tests: [
"**.functions.nativ.**",
]
name: ${{ matrix.tests }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: ${{ matrix.tests }}
uses: ./.github/action/
id: test
with:
test-to-run: ${{ matrix.tests }}
- name: Clean Github Artifact Name of Asterisks
run: |
ARTIFACT_NAME="transient_jacoco"
ARTIFACT_NAME+="-${{ matrix.os }}"
ARTIFACT_NAME+="-java-${{ matrix.java }}"
ARTIFACT_NAME+="-${{ matrix.javadist }}"
ARTIFACT_NAME+="-${{ matrix.tests }}"
ARTIFACT_NAME=${ARTIFACT_NAME//\*/x} # replace * with x
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
- name: Save Java Test Coverage as Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: target/jacoco.exec
retention-days: 1
determine_test_coverage:
name: Determine Test Coverage
runs-on: ubuntu-latest
needs: [
java_tests
]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Cache Maven Dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-test-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-test-
- name: Download all Jacoco Artifacts
uses: actions/download-artifact@v3
with:
path: target
- name: Merge Jacoco Artifacts
run: mvn jacoco:merge
- name: Process Classes
run: mvn process-classes
- name: Generate Code Coverage Report
run: mvn jacoco:report
- name: Upload Jacoco Report Artifact PR
if: (github.repository_owner == 'apache') && (github.ref_name != 'main')
uses: actions/upload-artifact@v3
with:
name: Java Code Coverage (Jacoco)
path: target/site/jacoco
retention-days: 7
- name: Upload Jacoco Report Artifact Main
if: (github.repository_owner == 'apache') && (github.ref_name == 'main')
uses: actions/upload-artifact@v3
with:
name: Java Code Coverage (Jacoco)
path: target/site/jacoco
retention-days: 30
- name: Upload Jacoco Report Artifact Fork
if: (github.repository_owner != 'apache')
uses: actions/upload-artifact@v3
with:
name: Java Code Coverage (Jacoco)
path: target/site/jacoco
retention-days: 3