Skip to content

Commit 6748108

Browse files
committed
CI: latest version of workflow
1 parent 5671046 commit 6748108

File tree

1 file changed

+16
-35
lines changed

1 file changed

+16
-35
lines changed

.github/workflows/ci.yml

+16-35
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ jobs:
4848
working-directory: plugin
4949
run: |
5050
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
5163
- name: Package signed .deb
5264
working-directory: plugin
5365
env:
@@ -73,47 +85,16 @@ jobs:
7385
name: deb
7486
path: plugin/target/${{ steps.requestPom.outputs.name }}-${{ steps.requestPom.outputs.version }}.deb
7587
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
10988
- name: Release
89+
if: startsWith(github.ref, 'refs/tags/')
11090
uses: softprops/action-gh-release@v1
11191
with:
11292
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
11595
fail_on_unmatched_files: true
11696
- name: Deploy to Maven Central
97+
if: startsWith(github.ref, 'refs/tags/')
11798
working-directory: plugin
11899
env:
119100
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

0 commit comments

Comments
 (0)