48
48
working-directory : plugin
49
49
run : |
50
50
mvn package --batch-mode
51
+ - name : Copy jar to backend tests runtime
52
+ working-directory : plugin
53
+ run : |
54
+ mkdir runtime/graylog/plugin
55
+ cp target/${{ steps.requestPom.outputs.name }}-${{ steps.requestPom.outputs.version }}.jar runtime/graylog/plugin
56
+ - name : Execute backend tests
57
+ working-directory : plugin/validation
58
+ run : |
59
+ python -m venv venv
60
+ source venv/bin/activate
61
+ pip install -r requirements.txt
62
+ python -m unittest
51
63
- name : Package signed .deb
52
64
working-directory : plugin
53
65
env :
@@ -73,47 +85,16 @@ jobs:
73
85
name : deb
74
86
path : plugin/target/${{ steps.requestPom.outputs.name }}-${{ steps.requestPom.outputs.version }}.deb
75
87
if-no-files-found : error
76
-
77
- backendTests :
78
- runs-on : ubuntu-20.04
79
- needs : build
80
- steps :
81
- - name : Check out repository code
82
- uses : actions/checkout@v2
83
- - name : Download jar from build
84
- uses : actions/download-artifact@v2
85
- with :
86
- name : jar
87
- path : runtime/graylog/plugin
88
- - name : Execute tests
89
- working-directory : validation
90
- run : |
91
- python -m venv venv
92
- source venv/bin/activate
93
- pip install -r requirements.txt
94
- python -m unittest
95
-
96
- release :
97
- runs-on : ubuntu-20.04
98
- needs : [build, backendTests]
99
- if : startsWith(github.ref, 'refs/tags/')
100
- steps :
101
- - name : Download .jar from build
102
- uses : actions/download-artifact@v2
103
- with :
104
- name : jar
105
- - name : Download .deb from build
106
- uses : actions/download-artifact@v2
107
- with :
108
- name : deb
109
88
- name : Release
89
+ if : startsWith(github.ref, 'refs/tags/')
110
90
uses : softprops/action-gh-release@v1
111
91
with :
112
92
files : |
113
- * .jar
114
- * .deb
93
+ plugin/target/${{ steps.requestPom.outputs.name }}-${{ steps.requestPom.outputs.version }} .jar
94
+ plugin/target/${{ steps.requestPom.outputs.name }}-${{ steps.requestPom.outputs.version }} .deb
115
95
fail_on_unmatched_files : true
116
96
- name : Deploy to Maven Central
97
+ if : startsWith(github.ref, 'refs/tags/')
117
98
working-directory : plugin
118
99
env :
119
100
SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
0 commit comments