File tree Expand file tree Collapse file tree 4 files changed +42
-23
lines changed
Expand file tree Collapse file tree 4 files changed +42
-23
lines changed Original file line number Diff line number Diff line change 1+ name : Java CI
2+
3+ # Trigger workflow on push or pull_request
4+ # Note - the first pull_request from a forked repo will need to be given approval to run
5+ on : [push, pull_request]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - uses : actions/checkout@v2
13+
14+ - name : Set up JDK 11
15+ uses : actions/setup-java@v2
16+ with :
17+ java-version : ' 11'
18+ distribution : ' adopt'
19+
20+ - name : Cache Maven Repo
21+ uses : actions/cache@v2
22+ with :
23+ path : ~/.m2
24+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
25+ restore-keys : ${{ runner.os }}-m2
26+
27+ - name : Build Test and Verify
28+ run : mvn -B -U clean install -Dmaven.javadoc.skip=true
29+
30+ - name : SonarCloud Scan
31+ run : |
32+ if ["$SONAR_TOKEN" == ""]; then
33+ echo "Sonar secure variables NOT available"
34+ else
35+ echo "Sonar secure variables ARE available"
36+ mvn -B sonar:sonar -Dsonar.projectKey="bordertech-java-common" -Dsonar.organization="bordertech-github" -Dsonar.host.url="https://sonarcloud.io"
37+ fi
38+ env :
39+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11# Change log
22
33## Release in-progress
4+ * Switch from travis-ci to GitHub Actions #75
45
56## 1.0.17
67* Update plugins to latest version
Original file line number Diff line number Diff line change 11# java-common
22
33## Status
4- [ ![ Build Status] ( https://travis-ci .com/BorderTech/java-common. svg?branch=master )] ( https://travis-ci .com/BorderTech/java-common )
4+ [ ![ Build Status] ( https://github .com/BorderTech/java-common/actions/workflows/github-actions-build.yml/badge. svg )] ( https://github .com/BorderTech/java-common/actions/workflows/github-actions-build.yml )
55[ ![ Quality Gate Status] ( https://sonarcloud.io/api/project_badges/measure?project=bordertech-java-common&metric=alert_status )] ( https://sonarcloud.io/dashboard?id=bordertech-java-common )
66[ ![ Reliability Rating] ( https://sonarcloud.io/api/project_badges/measure?project=bordertech-java-common&metric=reliability_rating )] ( https://sonarcloud.io/dashboard?id=bordertech-java-common )
77[ ![ Codacy Badge] ( https://api.codacy.com/project/badge/Grade/fd8ef044a86d44e8931410382035f8e2 )] ( https://www.codacy.com/gh/BorderTech/java-common?utm_source=github.com& ; utm_medium=referral& ; utm_content=BorderTech/java-common& ; utm_campaign=Badge_Grade )
You can’t perform that action at this time.
0 commit comments