-
Notifications
You must be signed in to change notification settings - Fork 3
85 lines (84 loc) · 3.12 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
75
76
77
78
79
80
81
82
83
84
85
name: 'Continuous Integration'
on:
push:
workflow_dispatch:
env:
ALFRESCO_NEXUS_USERNAME: ${{ secrets.ALFRESCO_NEXUS_USERNAME }}
ALFRESCO_NEXUS_PASSWORD: ${{ secrets.ALFRESCO_NEXUS_PASSWORD }}
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 }}
BRANCH_NAME: ${{ github.ref_name }}
jobs:
apix-interface:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Login to Docker
uses: docker/login-action@v2
with:
registry: private.docker.xenit.eu
username: ${{ secrets.CLOUDSMITH_USER }}
password: ${{ secrets.CLOUDSMITH_APIKEY }}
- name: Build interface # Execute before integration testing to catch errors early
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: :apix-interface:build :apix-interface:javadoc
- name: Unit test REST API
uses: gradle/gradle-build-action@v2.4.2
with:
arguments: --info :apix-rest:test
- name: Publish
if: ${{ startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/release') }}"
uses: gradle/gradle-build-action@v2.4.2
with:
arguments: --info -PsigningKeyId=DF8285F0 :apix-interface:publish
apix-impl:
strategy:
matrix:
alfresco_version: [ 231, 232 ]
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Login to Docker
uses: docker/login-action@v2
with:
registry: private.docker.xenit.eu
username: ${{ secrets.CLOUDSMITH_USER }}
password: ${{ secrets.CLOUDSMITH_APIKEY }}
- name: Build and test
uses: gradle/gradle-build-action@v2.4.2
with:
arguments: >-
--info
:apix-impl:apix-impl-${{ matrix.alfresco_version }}:test
:apix-integrationtests-client:alfresco:${{ matrix.alfresco_version }}:integrationTest
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3.7.6
if: success() || failure()
with:
check_name: "test-reports-${{ matrix.alfresco_version }}"
report_paths: '**/build/test-results/**/TEST-*.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}
detailed_summary: true
- name: Publish
if: ${{ startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/release') }}
uses: gradle/gradle-build-action@v2.4.2
with:
arguments: >-
--info -PsigningKeyId=DF8285F0
:alfresco:${{ matrix.alfresco_version }}:publish