-
Notifications
You must be signed in to change notification settings - Fork 77
103 lines (80 loc) · 3.06 KB
/
springwolf-plugins.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: springwolf-plugins
on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize, ready_for_review ]
workflow_dispatch:
permissions:
contents: read
checks: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
plugin: [ "amqp", "cloud-stream", "jms", "kafka", "sns", "sqs", "stomp" ]
env:
plugin: springwolf-plugins/springwolf-${{ matrix.plugin }}-plugin
example: springwolf-examples/springwolf-${{ matrix.plugin }}-example
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Check formatting (before running tests) on plugin
run: ./gradlew -p ${{ env.plugin }} spotlessCheck
- name: Check formatting (before running tests) on example
run: ./gradlew -p ${{ env.example }} spotlessCheck
- name: Run unit tests
run: ./gradlew -p ${{ env.plugin }} test
- name: Run integration tests
run: ./gradlew -p ${{ env.example }} test
- name: Run build, check, analyzeDependencies on plugin
run: ./gradlew -p ${{ env.plugin }} build
- name: Run build, check, analyzeDependencies on example
run: ./gradlew -p ${{ env.example }} build
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: success() || failure()
with:
check_name: test-plugin-${{ matrix.plugin }}-junit
require_tests: true
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Run e2e tests
run: ./gradlew -p springwolf-examples/e2e npm_run_test
env:
SPRINGWOLF_EXAMPLE: ${{ matrix.plugin }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-plugin-${{ matrix.plugin }}-playwright
path: springwolf-examples/e2e/playwright-report/
retention-days: 14
- name: Publish docker image
if: github.ref == 'refs/heads/master'
run: ./gradlew -p ${{ env.example }} dockerBuildImage dockerPushImage
env:
ORG_GRADLE_PROJECT_SNAPSHOT: true
ORG_GRADLE_PROJECT_DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
ORG_GRADLE_PROJECT_DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish package
if: github.ref == 'refs/heads/master'
run: ./gradlew -p ${{ env.plugin }} publish
env:
ORG_GRADLE_PROJECT_SNAPSHOT: true
ORG_GRADLE_PROJECT_SIGNINGKEY: ${{secrets.ORG_GRADLE_PROJECT_SIGNINGKEY}}
ORG_GRADLE_PROJECT_SIGNINGPASSWORD: ${{secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD}}
ORG_GRADLE_PROJECT_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
ORG_GRADLE_PROJECT_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}