Skip to content

Commit 36cb3f7

Browse files
Merge pull request #1777 from BorderTech/feature/setup-github-actions
Switch to GitHub Actions
2 parents 19dcb1e + 705e456 commit 36cb3f7

5 files changed

Lines changed: 43 additions & 76 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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 verify -Dmaven.javadoc.skip=true -Dpmd.verbose=false -DskipOptionalQA=true -PskipCoreOptionalTests
29+
env:
30+
MOZ_HEADLESS: 1
31+
32+
- name: SonarCloud Scan
33+
run: |
34+
if ["$SONAR_TOKEN"] == ""; then
35+
echo "Sonar secure variables NOT available"
36+
else
37+
echo "Sonar secure variables ARE available"
38+
mvn -B sonar:sonar -Dsonar.projectKey="bordertech-wcomponents" -Dsonar.organization="bordertech-github" -Dsonar.host.url="https://sonarcloud.io"
39+
fi
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Its goal is to enable Java developers to build AJAX enabled, WCAG 2.0 compliant
1010

1111
## Status
1212

13-
[![Build Status](https://travis-ci.com/BorderTech/wcomponents.svg?branch=georgie)](https://travis-ci.com/BorderTech/wcomponents)
13+
[![Build Status](https://github.com/BorderTech/wcomponents/actions/workflows/github-actions-build.yml/badge.svg)](https://github.com/BorderTech/wcomponents/actions/workflows/github-actions-build.yml)
1414
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bordertech-wcomponents&metric=alert_status)](https://sonarcloud.io/dashboard?id=bordertech-wcomponents)
1515
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=bordertech-wcomponents&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=bordertech-wcomponents)
1616
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=bordertech-wcomponents&metric=coverage)](https://sonarcloud.io/dashboard?id=bordertech-wcomponents)

ci-settings.xml

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

travis.sh

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

0 commit comments

Comments
 (0)