-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (51 loc) · 1.9 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
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: SonarQube Scan
uses: sonarsource/sonarcloud-github-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- 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"