forked from danrodgar/intro-unit-testing
-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (74 loc) · 3.26 KB
/
Copy pathquality.yml
File metadata and controls
88 lines (74 loc) · 3.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Quality
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Step 1 - Checkout main brach from GitHub
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Step 2 - Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Step 3 - Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Step 4 - Cache Maven package
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Step 5 - Build Maven projects
run: |
cd code/calculatorExample ; mvn -B package --file pom.xml
cd ../complexNumber ; mvn -B package --file pom.xml
cd ../CucumberTestExample ; mvn -B package --file pom.xml
cd ../EasyMockExample ; mvn -B package --file pom.xml
cd ../MavenExamples/AppEx0 ; mvn -B package --file pom.xml
cd ../../MockitoATM ; mvn -B package --file pom.xml
cd ../TDDExampleFactorial ; mvn -B package --file pom.xml
- name: Step 6.1 - Build and analyze calculatorExample
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: cd code/calculatorExample ; mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- name: Step 6.2 - Build and analyze complexNumber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: cd code/complexNumber ; mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- name: Step 6.3 - Build and analyze CucumberTestExample
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: cd code/CucumberTestExample ; mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- name: Step 6.4 - Build and analyze EasyMockExample
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: cd code/EasyMockExample ; mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- name: Step 6.5 - Build and analyze MavenExamples
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: cd code/MavenExamples/AppEx0 ; mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- name: Step 6.5 - Build and analyze MockitoATM
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: cd code/MockitoATM ; mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- name: Step 6.6 - Build and analyze TDDExampleFactorial
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: cd code/TDDExampleFactorial ; mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar