Skip to content

Commit f1cbfb4

Browse files
Merge pull request #76 from BorderTech/feature/github-actions
Switch to GitHub Actions
2 parents 2b446ec + 84cc4cb commit f1cbfb4

File tree

4 files changed

+42
-23
lines changed

4 files changed

+42
-23
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
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 }}

.travis.yml

Lines changed: 0 additions & 22 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 #75
45

56
## 1.0.17
67
* Update plugins to latest version

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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)

0 commit comments

Comments
 (0)