File tree Expand file tree Collapse file tree 6 files changed +133
-13
lines changed Expand file tree Collapse file tree 6 files changed +133
-13
lines changed Original file line number Diff line number Diff line change 1
- ---
1
+ #
2
+ # Copyright 2009-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
+
2
17
name : Java CI
3
18
4
19
on : [push]
8
23
runs-on : ${{ matrix.os }}
9
24
strategy :
10
25
matrix :
11
- os : [ubuntu-18.04 , macOS-latest, windows-2016 ]
26
+ os : [ubuntu-latest , macOS-latest, windows-latest ]
12
27
java : [8, 11, 15, 16-ea]
13
28
fail-fast : false
14
29
max-parallel : 4
15
30
name : Test JDK ${{ matrix.java }}, ${{ matrix.os }}
16
31
17
32
steps :
18
- - uses : actions/checkout@v1
33
+ - uses : actions/checkout@v2
19
34
- name : Set up JDK
20
35
uses : actions/setup-java@v1
21
36
with :
22
37
java-version : ${{ matrix.java }}
23
38
- name : Test with Maven
24
- run : mvn test -B --file pom.xml
25
-
26
- ...
39
+ run : ./mvnw test -B
Original file line number Diff line number Diff line change
1
+ #
2
+ # Copyright 2009-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 : SonarCloud
18
+
19
+ on :
20
+ push :
21
+ branches :
22
+ - master
23
+
24
+ jobs :
25
+ build :
26
+ if : github.repository_owner == 'mybatis'
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ - uses : actions/checkout@v2
30
+ with :
31
+ # Disabling shallow clone is recommended for improving relevancy of reporting
32
+ fetch-depth : 0
33
+ - name : Set up JDK
34
+ uses : actions/setup-java@v1
35
+ with :
36
+ java-version : 11
37
+ - name : Analyze with SonarCloud
38
+ run : ./mvnw verify sonar:sonar -B -Dsonar.projectKey=mybatis_mybatis-3 -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN
39
+ env :
40
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
Original file line number Diff line number Diff line change
1
+ #
2
+ # Copyright 2009-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 : Sonatype
18
+
19
+ on :
20
+ push :
21
+ branches :
22
+ - master
23
+
24
+ jobs :
25
+ build :
26
+ if : github.repository_owner == 'mybatis'
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ - uses : actions/checkout@v2
30
+ - name : Set up JDK
31
+ uses : actions/setup-java@v1
32
+ with :
33
+ java-version : 11
34
+ - name : Deploy to Sonatype
35
+ run : ./mvnw deploy -DskipTests -B --settings ./.mvn/settings.xml
36
+ env :
37
+ CI_DEPLOY_USERNAME : ${{ secrets.CI_DEPLOY_USERNAME }}
38
+ CI_DEPLOY_PASSWORD : ${{ secrets.CI_DEPLOY_PASSWORD }}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!--
3
+
4
+ Copyright 2009-2020 the original author or authors.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+
18
+ -->
19
+ <extensions >
20
+ <extension >
21
+ <groupId >fr.jcgay.maven</groupId >
22
+ <artifactId >maven-profiler</artifactId >
23
+ <version >3.0</version >
24
+ </extension >
25
+ </extensions >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<!--
3
3
4
- Copyright 2009-2016 the original author or authors.
4
+ Copyright 2009-2020 the original author or authors.
5
5
6
6
Licensed under the Apache License, Version 2.0 (the "License");
7
7
you may not use this file except in compliance with the License.
26
26
</server >
27
27
<server >
28
28
<id >gh-pages</id >
29
- <username >git</username >
30
- <password >${env.CI_SITE_PASSWORD}</password >
29
+ </server >
30
+ <server >
31
+ <id >github</id >
32
+ <username >${env.CI_DEPLOY_USERNAME}</username >
33
+ <password >${env.GITHUB_TOKEN}</password >
31
34
</server >
32
35
</servers >
33
36
</settings >
Original file line number Diff line number Diff line change @@ -36,21 +36,21 @@ if [ $TRAVIS_REPO_SLUG == "mybatis/mybatis-3" ] && [ "$TRAVIS_PULL_REQUEST" == "
36
36
if [ $TRAVIS_JDK_VERSION == " openjdk8" ]; then
37
37
38
38
# Deploy to sonatype
39
- ./mvnw clean deploy -Dmaven.test.skip=true -q --settings ./travis /settings.xml
39
+ ./mvnw clean deploy -Dmaven.test.skip=true -q --settings ./mvn /settings.xml
40
40
echo -e " Successfully deployed SNAPSHOT artifacts to Sonatype under Travis job ${TRAVIS_JOB_NUMBER} "
41
41
42
- ./mvnw clean test jacoco:report coveralls:report -q --settings ./travis /settings.xml
42
+ ./mvnw clean test jacoco:report coveralls:report -q --settings ./mvn /settings.xml
43
43
echo -e " Successfully ran coveralls under Travis job ${TRAVIS_JOB_NUMBER} "
44
44
45
45
./mvnw sonar:sonar -Dsonar.projectKey=mybatis_mybatis-3
46
46
47
47
# Deploy to site
48
48
# Cannot currently run site this way
49
- # ./mvnw site site:deploy -q --settings ./travis /settings.xml
49
+ # ./mvnw site site:deploy -q --settings ./mvn /settings.xml
50
50
# echo -e "Successfully deploy site under Travis job ${TRAVIS_JOB_NUMBER}"
51
51
52
52
# Deploy to sonar
53
- ./mvnw clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=ccf0be39fd0ca5ea5aa712247c79da7233cd3caa -q --settings ./travis /settings.xml
53
+ ./mvnw clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=ccf0be39fd0ca5ea5aa712247c79da7233cd3caa -q --settings ./mvn /settings.xml
54
54
echo -e " Successfully ran Sonar integration under Travis job ${TRAVIS_JOB_NUMBER} "
55
55
else
56
56
echo " Java Version does not support additonal activity for travis CI"
You can’t perform that action at this time.
0 commit comments