Browse Source

Feature ci (#1447)

* codecov
pull/2/head
khadgarmage 5 years ago committed by GitHub
parent
commit
12fd10316d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      .github/workflows/ci.yml
  2. 46
      .github/workflows/ci_ut.yml
  3. 27
      pom.xml

17
.github/workflows/ci.yml

@ -1,17 +0,0 @@
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn apache-rat:check --file pom.xml

46
.github/workflows/ci_ut.yml

@ -0,0 +1,46 @@
#
# 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.
#
on: ["pull_request"]
name: Test Coveralls Parallel
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Compile
run: |
export MAVEN_OPTS='-Dmaven.repo.local=.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g'
mvn test -Dmaven.test.skip=false cobertura:cobertura
CODECOV_TOKEN="09c2663f-b091-4258-8a47-c981827eb29a" bash <(curl -s https://codecov.io/bash)

27
pom.xml

@ -111,6 +111,7 @@
<jacoco.version>0.8.4</jacoco.version>
<jcip.version>1.0</jcip.version>
<maven.deploy.skip>false</maven.deploy.skip>
<cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
</properties>
<dependencyManagement>
@ -602,7 +603,7 @@
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<skip>true</skip><!--not skip compile test classes-->
<skip>false</skip><!--not skip compile test classes-->
</configuration>
</plugin>
<plugin>
@ -611,7 +612,7 @@
<version>${maven-surefire-plugin.version}</version>
<configuration>
<includes>
<include>**/*Test*.java</include><!--run test classes-->
<include>**/*CollectionUtilsTest.java</include><!--run test classes-->
</includes>
<!-- <skip>true</skip> -->
</configuration>
@ -714,6 +715,7 @@
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
</sourceDirectories>
<excludes>**\/generated-sources\/</excludes>
<skip>true</skip>
</configuration>
<executions>
<execution>
@ -724,6 +726,27 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>${cobertura-maven-plugin.version}</version>
<configuration>
<check>
</check>
<aggregate>true</aggregate>
<encoding>${project.build.sourceEncoding}</encoding>
<quiet>true</quiet>
<format>xml</format>
<instrumentation>
<ignoreTrivial>true</ignoreTrivial>
<ignoreMethodAnnotations>
<ignoreMethodAnnotation>lombok.Generated</ignoreMethodAnnotation>
</ignoreMethodAnnotations>
<excludes>
</excludes>
</instrumentation>
</configuration>
</plugin>
</plugins>
</build>

Loading…
Cancel
Save