-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (40 loc) · 1.21 KB
/
ci.yml
File metadata and controls
47 lines (40 loc) · 1.21 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
name: CI
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
workflow_dispatch:
jobs:
tests:
name: Test
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Use Java version 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
# run tests
- name: Make Gradle executable
run: chmod +x gradlew
- name: Run unit & integration tests with coverage
run: ./gradlew :services:hanke-service:test :services:hanke-service:integrationTest :services:hanke-service:jacocoTestReport --no-daemon --info
- name: Publish JUnit test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
**/build/test-results/test/*.xml
**/build/test-results/integrationTest/*.xml
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}