Skip to content

Commit cbbe06f

Browse files
Merge pull request #47 from BorderTech/latest-qa
Switch from travis-ci to Github Actions
2 parents 48c3cd7 + 7d028bc commit cbbe06f

File tree

5 files changed

+44
-30
lines changed

5 files changed

+44
-30
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 -Pdisplay-versions
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-config" -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 }}

.travis.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Change log
22

33
## Release in-progress
4+
* Switch from travis-ci to GitHub Actions #46
45

56
## 1.0.7
67

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Config
22

33
## Status
4-
[![Build Status](https://travis-ci.com/BorderTech/java-config.svg?branch=master)](https://travis-ci.com/BorderTech/java-config)
4+
[![Build Status](https://github.com/BorderTech/java-config/actions/workflows/github-actions-build.yml/badge.svg)](https://github.com/BorderTech/java-config/actions/workflows/github-actions-build.yml)
55
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bordertech-java-config&metric=alert_status)](https://sonarcloud.io/dashboard?id=bordertech-java-config)
66
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=bordertech-java-config&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=bordertech-java-config)
77
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=bordertech-java-config&metric=coverage)](https://sonarcloud.io/dashboard?id=bordertech-java-config)

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
</issueManagement>
4040

4141
<ciManagement>
42-
<system>Travis CI</system>
43-
<url>https://travis-ci.com/BorderTech/java-config</url>
42+
<system>Github Actions</system>
43+
<url>https://github.com/BorderTech/java-config/actions</url>
4444
</ciManagement>
4545

4646
<dependencies>

0 commit comments

Comments
 (0)