-
-
Notifications
You must be signed in to change notification settings - Fork 53
62 lines (57 loc) · 2.24 KB
/
build.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
# Version 2023-03-05
name: Java CI
on: [push, pull_request]
jobs:
build:
uses: igniterealtime/openfire-plugin-builder-action/.github/workflows/openfire-plugin-build.yml@main
secrets:
IGNITE_REALTIME_MAVEN_USERNAME: ${{ secrets.IGNITE_REALTIME_MAVEN_USERNAME }}
IGNITE_REALTIME_MAVEN_PASSWORD: ${{ secrets.IGNITE_REALTIME_MAVEN_PASSWORD }}
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Openfire actions e.g. 'startCIServer'
uses: actions/checkout@v4
with:
repository: igniterealtime/Openfire
sparse-checkout: |
.github
- name: Download a recent Openfire daily build.
run: |
# This tries to find the most recent daily build, going back 30 days if none are available.
#Note that the cache above will cause whatever build that's download to be considered 'todays' build.
for i in $(seq 0 30); do
STAMP=`date --date="$i day ago" +%F`;
echo "Attempting to download Openfire build for $STAMP"
curl --fail -L "https://download.igniterealtime.org/openfire/dailybuilds/openfire_$STAMP.tar.gz" -o openfire.tar.gz && break
done
- name: Extract Openfire
run: |
tar -xzf openfire.tar.gz
- name: Set up yq
uses: frenck/action-setup-yq@v1
- name: Add extras to the demoboot file
run: |
yq eval-all '. as $item ireduce ({}; . * $item )' openfire/conf/openfire-demoboot.xml test/demoboot-additions.xml > openfire/conf/openfire-demoboot.xml
- name: Start CI server from distribution
id: startCIServer
uses: ./.github/actions/startserver-action
with:
distBaseDir: './openfire'
domain: 'example.org'
ip: '127.0.0.1'
- name: Download the built artifacts
uses: actions/download-artifact@v4
with:
name: restAPI
path: .
- name: Install plugin
run: |
cp restAPI-openfire-plugin-assembly.jar openfire/plugins/restAPI.jar
- uses: gacts/install-hurl@v1
- name: Test the plugin
run: |
# Wait for the server to start
sleep 30
# Test the plugin
hurl --test test/restAPI.hurl