File tree Expand file tree Collapse file tree
java/com/sample/app/ui/test Expand file tree Collapse file tree 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 8
15+ uses : actions/setup-java@v2
16+ with :
17+ java-version : ' 8'
18+ distribution : ' adopt'
19+
20+ - name : Cache Maven Repo
21+ uses : actions/cache@v4
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
29+
30+ - name : Set up JDK 17
31+ uses : actions/setup-java@v2
32+ with :
33+ java-version : ' 17'
34+ distribution : ' adopt'
35+
36+ - name : SonarCloud Scan
37+ run : |
38+ if ["$SONAR_TOKEN" == ""]; then
39+ echo "Sonar secure variables NOT available"
40+ else
41+ echo "Sonar secure variables ARE available"
42+ mvn -B sonar:sonar -Dsonar.projectKey="bordertech-sample-app" -Dsonar.organization="bordertech-github" -Dsonar.host.url="https://sonarcloud.io"
43+ fi
44+ env :
45+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Sample application demonstrates how a project can be structured with RESTful ser
55This project can be cloned as a template.
66
77## Status
8- [ ![ Build Status ] ( https://travis-ci .com/BorderTech/sample-app. svg?branch=master )] ( https://travis-ci .com/BorderTech/sample-app )
8+ [ ![ Java CI ] ( https://github .com/BorderTech/sample-app/actions/workflows/github-actions-build.yml/badge. svg )] ( https://github .com/BorderTech/sample-app/actions/workflows/github-actions-build.yml )
99[ ![ Quality Gate Status] ( https://sonarcloud.io/api/project_badges/measure?project=bordertech-sample-app&metric=alert_status )] ( https://sonarcloud.io/dashboard?id=bordertech-sample-app )
1010[ ![ Reliability Rating] ( https://sonarcloud.io/api/project_badges/measure?project=bordertech-sample-app&metric=reliability_rating )] ( https://sonarcloud.io/dashboard?id=bordertech-sample-app )
1111[ ![ Coverage] ( https://sonarcloud.io/api/project_badges/measure?project=bordertech-sample-app&metric=coverage )] ( https://sonarcloud.io/dashboard?id=bordertech-sample-app )
@@ -19,18 +19,7 @@ Follow these commands to fetch the source and build:
1919
20201 . git clone https://github.com/BorderTech/sample-app.git my-dir (first time only)
21212 . cd my-dir
22-
23- #### Quick build
24-
25- Quick build profile has QA and Tests turned off
26-
27- 3 . ``` mvn install -Pquick-build ```
28-
29- #### Full build
30-
31- On windows make sure chromedriver is in PATH, on * NIX in current user profile. Otherwise provide system property ` -Dwebdriver.chrome.driver ` . See [ ChromeDriver] ( https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver ) for more information.
32-
33- 4 . ``` mvn install -Dwebdriver.chrome.driver=/path/to/chromedriver.exe ```
22+ 3 . mvn clean install -Pquick-build (The profile quick-build has QA and Tests turned off)
3423
3524<a name =" restservice " ></a >
3625### Run REST Service
Original file line number Diff line number Diff line change 55 <parent >
66 <groupId >com.github.bordertech.common</groupId >
77 <artifactId >qa-parent</artifactId >
8- <version >1.0.16 </version >
8+ <version >1.0.21 </version >
99 </parent >
1010
1111 <packaging >pom</packaging >
1212
1313 <properties >
1414 <bt .qa.skip>false</bt .qa.skip>
15- <!-- Report Vulnerabilities. -->
16- <failBuildOnCVSS >11</failBuildOnCVSS >
17- <!-- Update every 168 hours (7 days) -->
18- <cveValidForHours >168</cveValidForHours >
1915 <!-- warName defaults to maven's generated name, with option to modify it -->
2016 <app .warName>${project.build.finalName} </app .warName>
2117 <web .warName>${project.build.finalName} </web .warName>
18+ <dependency-check .skip>true</dependency-check .skip>
2219 </properties >
2320
2421 <name >sample-app-parent</name >
Original file line number Diff line number Diff line change 9090 <dependency >
9191 <groupId >com.github.bordertech.webfriends</groupId >
9292 <artifactId >webfriends-selenium-wc</artifactId >
93- <version >0.0.4</version >
93+ <version >0.0.6</version >
94+ <scope >test</scope >
95+ </dependency >
96+ <dependency >
97+ <groupId >com.github.bordertech.webfriends</groupId >
98+ <artifactId >webfriends-selenium-junit</artifactId >
99+ <version >0.0.6</version >
94100 <scope >test</scope >
95101 </dependency >
96102
105111 <dependency >
106112 <groupId >com.google.guava</groupId >
107113 <artifactId >guava</artifactId >
108- <version >27.1 -jre</version >
114+ <version >33.5.0 -jre</version >
109115 <scope >test</scope >
110116 </dependency >
111117
Original file line number Diff line number Diff line change 11package com .sample .app .ui .test ;
22
3+ import com .github .bordertech .webfriends .junit .runner .AbstractFriendTestCase ;
34import com .github .bordertech .webfriends .selenium .common .tag .SeleniumTags ;
45import com .github .bordertech .webfriends .selenium .element .form .SButton ;
56import com .github .bordertech .webfriends .selenium .element .sections .SHeading1 ;
67import com .github .bordertech .webfriends .selenium .element .table .STable ;
7- import com .github .bordertech .webfriends .selenium .smart .junit . SmartDriverTestCase ;
8+ import com .github .bordertech .webfriends .selenium .smart .driver . SmartDriver ;
89import com .sample .app .test .Smoke ;
910import com .sample .app .test .Unit ;
1011import org .junit .Assert ;
1516 * Sample UI Unit tests.
1617 */
1718@ Category ({Unit .class , Smoke .class })
18- public class SampleUiTest extends SmartDriverTestCase {
19+ public class SampleUiTest extends AbstractFriendTestCase < SmartDriver > {
1920// ## SMOKE Properties
2021// ##bordertech.webfriends.selenium.launchServer=false
2122// ##bordertech.webfriends.selenium.serverUrl=http://localhost:8081/lde
Original file line number Diff line number Diff line change @@ -17,3 +17,5 @@ bordertech.factory.impl.com.github.bordertech.webfriends.selenium.util.driver.Pa
1717# # SMOKE Properties
1818# #bordertech.webfriends.selenium.launchServer=false
1919# #bordertech.webfriends.selenium.serverUrl=http://localhost:8081/lde
20+
21+ # #bordertech.webfriends.selenium.driver.runner=firefox
You can’t perform that action at this time.
0 commit comments