Skip to content

Commit 0698bed

Browse files
authored
Merge pull request #180 from hazendaz/master
[actions] Add coveralls / update sonar / drop travis ci
2 parents a3504e9 + 4cfa700 commit 0698bed

File tree

4 files changed

+42
-70
lines changed

4 files changed

+42
-70
lines changed

.github/workflows/coveralls.yaml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#
2+
# Copyright 2016-2020 the original author or authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
name: Coveralls
18+
19+
on: [push, pull_request]
20+
21+
jobs:
22+
build:
23+
if: github.repository_owner == 'mybatis'
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Set up JDK
28+
uses: actions/setup-java@v1
29+
with:
30+
java-version: 8
31+
- name: Report Coverage to Coveralls for Pull Requests
32+
if: github.event_name == 'pull_request'
33+
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
PR_NUMBER: ${{ github.event.number }}
37+
- name: Report Coverage to Coveralls for General Push
38+
if: github.event_name == 'push'
39+
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sonar.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
with:
3636
java-version: 11
3737
- name: Analyze with SonarCloud
38-
run: ./mvnw verify sonar:sonar -B -Dsonar.projectKey=mybatis_migrations -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dlicense.skip=true
38+
run: ./mvnw verify jacoco:report sonar:sonar -B -Dsonar.projectKey=mybatis_migrations -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dlicense.skip=true
3939
env:
4040
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4141
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.travis.yml

-15
This file was deleted.

travis/after_success.sh

-54
This file was deleted.

0 commit comments

Comments
 (0)