Skip to content

Commit 2bbd8b8

Browse files
committed
Update ci.yml
1 parent d841de3 commit 2bbd8b8

File tree

1 file changed

+68
-3
lines changed

1 file changed

+68
-3
lines changed

.github/workflows/ci.yml

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,76 @@ name: CI
33
on:
44
push:
55
pull_request:
6+
env:
7+
GRADLE_OPTS: >-
8+
-Dorg.gradle.project.org.alfresco.maven.nexus.username=${{ secrets.ALFRESCO_NEXUS_USERNAME }}
9+
-Dorg.gradle.project.org.alfresco.maven.nexus.password=${{ secrets.ALFRESCO_NEXUS_PASSWORD }}
610
711
jobs:
812
test:
913
runs-on: ubuntu-latest
1014
steps:
11-
# Log all env. variables that contain 'alfresco' (case insensitive).
12-
- name: Log Alfresco-related environment variables
13-
run: printenv | grep -i 'alfresco' || echo "No Alfresco-related environment variables found."
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- uses: actions/setup-java@v4
19+
with:
20+
java-version: 17
21+
distribution: temurin
22+
- name: Test
23+
run: ./gradlew test
24+
- name: Upload reports
25+
if: ${{ failure() }}
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: reports-test
29+
path: alfresco-health-processor-platform/build/reports
30+
- name: Upload analysis to sonarcloud
31+
env:
32+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
33+
GITHUB_TOKEN: ${{ github.token }}
34+
run: ./gradlew aggregateJacocoReport sonarqube
35+
- name: Javadoc
36+
run: ./gradlew javadoc
37+
integration-test:
38+
runs-on: ubuntu-latest
39+
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' || startsWith(github.ref, 'refs/tags/') }}
40+
strategy:
41+
matrix:
42+
flavour: [ "community" ]
43+
version: [ "231" ]
44+
steps:
45+
- uses: actions/checkout@v4
46+
with:
47+
fetch-depth: 0
48+
- uses: actions/setup-java@v4
49+
with:
50+
java-version: 17
51+
distribution: temurin
52+
- name: Test
53+
run: ./gradlew :integration-tests:alfresco-${{ matrix.flavour }}-${{ matrix.version }}:integrationTest -Prandom_ports=true
54+
- name: Upload reports
55+
if: ${{ failure() }}
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: reports-integration-test-${{ matrix.flavour }}-${{ matrix.version }}
59+
path: integration-tests/alfresco-${{ matrix.flavour }}-${{ matrix.version }}/build/reports
60+
publish:
61+
needs: [test, integration-test]
62+
runs-on: ubuntu-latest
63+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
64+
steps:
65+
- uses: actions/checkout@v4
66+
with:
67+
fetch-depth: 0
68+
- uses: actions/setup-java@v4
69+
with:
70+
java-version: 17
71+
distribution: temurin
72+
- name: Publish
73+
env:
74+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_CENTRAL_GPG_KEY }}
75+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVEN_CENTRAL_GPG_PASSWORD }}
76+
ORG_GRADLE_PROJECT_sonatype_username: ${{ secrets.SONATYPE_S01_USERNAME }}
77+
ORG_GRADLE_PROJECT_sonatype_password: ${{ secrets.SONATYPE_S01_PASSWORD }}
78+
run: ./gradlew publish -PsigningKeyId=CDE3528F

0 commit comments

Comments
 (0)