Skip to content

Commit

Permalink
Merge pull request #1777 from BorderTech/feature/setup-github-actions
Browse files Browse the repository at this point in the history
Switch to GitHub Actions
  • Loading branch information
jonathanaustin authored Jun 15, 2021
2 parents 19dcb1e + 705e456 commit 36cb3f7
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 76 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/github-actions-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Java CI

# Trigger workflow on push or pull_request
# Note - the first pull_request from a forked repo will need to be given approval to run
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

- name: Cache Maven Repo
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build Test and Verify
run: mvn -B -U clean verify -Dmaven.javadoc.skip=true -Dpmd.verbose=false -DskipOptionalQA=true -PskipCoreOptionalTests
env:
MOZ_HEADLESS: 1

- name: SonarCloud Scan
run: |
if ["$SONAR_TOKEN"] == ""; then
echo "Sonar secure variables NOT available"
else
echo "Sonar secure variables ARE available"
mvn -B sonar:sonar -Dsonar.projectKey="bordertech-wcomponents" -Dsonar.organization="bordertech-github" -Dsonar.host.url="https://sonarcloud.io"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Its goal is to enable Java developers to build AJAX enabled, WCAG 2.0 compliant

## Status

[![Build Status](https://travis-ci.com/BorderTech/wcomponents.svg?branch=georgie)](https://travis-ci.com/BorderTech/wcomponents)
[![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)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bordertech-wcomponents&metric=alert_status)](https://sonarcloud.io/dashboard?id=bordertech-wcomponents)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=bordertech-wcomponents&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=bordertech-wcomponents)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=bordertech-wcomponents&metric=coverage)](https://sonarcloud.io/dashboard?id=bordertech-wcomponents)
Expand Down
34 changes: 0 additions & 34 deletions ci-settings.xml

This file was deleted.

11 changes: 0 additions & 11 deletions travis.sh

This file was deleted.

0 comments on commit 36cb3f7

Please sign in to comment.