-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (60 loc) · 2.29 KB
/
ci.yml
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
on:
push:
pull_request:
workflow_dispatch:
name: 🧪 Continuous Integration
jobs:
ci:
runs-on: ubuntu-latest
container: fedora:38
steps:
- name: 🏗️ Setup Dependencies
run: |
dnf install -y java-17-openjdk maven git
- name: 📥 Checkout
uses: actions/checkout@v3
- name: 🛠️ Checkout Workaround
# The Checkout GitHub action has problems when running inside of a docker container (as we do).
# see: https://github.com/actions/checkout/issues/363
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: 🧪 Unit Tests
run: |
mvn test -Dtest="CucumberUnitTest" -Dsurefire.failIfNoSpecifiedTests=false
- name: 🧪 Integration Tests
run: |
mvn test -Dtest="CucumberIntegrationTest" -Dsurefire.failIfNoSpecifiedTests=false
- name: 🔍 Check for duplicate reports
id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
skip_after_successful_duplicate: true
concurrent_skipping: "same_content_newer"
- name: 📋 Unit Test Report
uses: phoenix-actions/test-reporting@v8
if: steps.skip_check.outputs.should_skip != 'true' && (success() || failure())
with:
name: 📋 Unit Test Report
reporter: java-junit
path: "**/*CucumberUnitTest.xml"
- name: 📋 Integration Test Report
uses: phoenix-actions/test-reporting@v8
if: steps.skip_check.outputs.should_skip != 'true' && (success() || failure())
with:
name: 📋 Integration Test Report
reporter: java-junit
path: "**/*CucumberIntegrationTest.xml"
- name: 👀 Sonar Scan
if: github.ref == 'refs/heads/master'
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONARQUBE_HOST }}
run: |
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Demo-App-backend -Dsonar.projectName='Demo App backend'
- name: 🤖 Sonar Summary
if: github.ref == 'refs/heads/master'
run: |
{
echo "### 🤖 Sonar Summary"
echo "${{ vars.SONARQUBE_HOST }}"
} >> $GITHUB_STEP_SUMMARY