-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (72 loc) · 2.39 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
73
74
name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Test
run: ./gradlew test
- name: Upload reports
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: reports-test
path: alfresco-health-processor-platform/build/reports
- name: Upload analysis to sonarcloud
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
run: ./gradlew aggregateJacocoReport sonarqube
- name: Javadoc
run: ./gradlew javadoc
integration-test:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' || startsWith(github.ref, 'refs/tags/') }}
strategy:
matrix:
flavour: [ "community" ]
version: [ "52", "61", "62", "70" ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Test
run: ./gradlew :integration-tests:alfresco-${{ matrix.flavour }}-${{ matrix.version }}:integrationTest -Prandom_ports=true
- name: Upload reports
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: reports-integration-test-${{ matrix.flavour }}-${{ matrix.version }}
path: integration-tests/alfresco-${{ matrix.flavour }}-${{ matrix.version }}/build/reports
publish:
needs: [test, integration-test]
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Publish
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_CENTRAL_GPG_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVEN_CENTRAL_GPG_PASSWORD }}
ORG_GRADLE_PROJECT_sonatype_username: ${{ secrets.SONATYPE_S01_USERNAME }}
ORG_GRADLE_PROJECT_sonatype_password: ${{ secrets.SONATYPE_S01_PASSWORD }}
run: ./gradlew publish -PsigningKeyId=CDE3528F