-
Notifications
You must be signed in to change notification settings - Fork 39
41 lines (38 loc) · 1.19 KB
/
continuous-integration.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
name: Continuous Integration
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
working-directory: ./generator
run: ./gradlew build
- name: Upload received files from failing tests
uses: actions/upload-artifact@v3
if: failure()
with:
name: Received-${{ runner.os }}
path: "generator/actual_*"
- name: Upload test results
uses: actions/upload-artifact@v3
if: always()
with:
name: TestResults-${{ runner.os }}
path: generator/build/reports/tests/test
- name: SonarQube
env:
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ./generator
if: ${{ github.ref == 'refs/heads/v3' }}
run: ./gradlew sonarqube -Dsonar.login=$SONAR_LOGIN