-
Notifications
You must be signed in to change notification settings - Fork 6
71 lines (71 loc) · 2.47 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
name: CI
on:
push:
branches:
- master
tags:
- v*
pull_request:
schedule:
- cron: '0 0 * * 1'
jobs:
build:
name: "build"
runs-on: ubuntu-latest
env:
TEST_GRADLE_VERSION: 8.9
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: 11
- name: Pull docker images
run: 'parallel docker pull -- xenit/alfresco-repository-skeleton:6.0 alfresco/alfresco-content-repository-community:6.0.7-ga tomcat:7-jre8 hello-world alpine:edge'
- name: Check
run: ./gradlew check -PintegrationTestGradleVersions=$TEST_GRADLE_VERSION
- name: Upload reports
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: reports-build
path: build/reports
- name: Upload analysis to sonarcloud
if: "${{ env.SONAR_TOKEN != '' }}"
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
run: ./gradlew sonarqube -Dsonar.projectKey=xenit-eu_alfresco-docker-gradle-plugin -Dsonar.organization=xenit-eu -Dsonar.host.url=https://sonarcloud.io -PintegrationTestGradleVersions=$TEST_GRADLE_VERSION
- name: Publish
if: ${{ startsWith(github.ref, 'refs/tags/') }}
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PLUGINS_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PLUGINS_PUBLISH_SECRET }}
run: ./gradlew publishPlugins -Pgradle.publish.key=$GRADLE_PUBLISH_KEY -Pgradle.publish.secret=$GRADLE_PUBLISH_SECRET
integration-test:
name: "integration-test (gradle-versions=${{ matrix.gradle-versions}})"
runs-on: ubuntu-latest
strategy:
matrix:
gradle-versions:
- 6.2,6.9
- 7.0,7.6
- 8.0,8.9
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: 11
- name: Pull docker images
run: 'parallel docker pull -- alfresco/alfresco-content-repository-community:6.0.7-ga tomcat:7-jre8 hello-world alpine:edge'
- name: Check
run: ./gradlew check -PintegrationTestGradleVersions=${{ matrix.gradle-versions }}
- name: Upload reports
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: reports-integration-test-${{ matrix.gradle-versions }}
path: build/reports