forked from pmmp/PocketMine-Docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
26 lines (26 loc) · 1.2 KB
/
.travis.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
language: minimal
sudo: required
env:
matrix:
- TEST_AGAINST="3.11.7" TESTSUITE_VERSION="3.11.1"
- TEST_AGAINST="3.15.0" TESTSUITE_VERSION="3.11.1"
services:
- docker
install:
- docker pull ubuntu:bionic
before_script:
- mkdir data
- sudo chown -R 1000:1000 ./testsuite ./data
script:
# Test if it builds
- docker build -t local-pocketmine-mp --build-arg PMMP_TAG=$TEST_AGAINST pocketmine-mp
# Test if it runs the normal server properly
- echo stop | docker run --rm -i local-pocketmine-mp
# Test if it loads plugins
- echo stop | docker run --rm -i -v $PWD/data:/data -v $PWD/testsuite/$TESTSUITE_VERSION/create-data:/plugins local-pocketmine-mp
- test -f data/plugin_data/data-test/create-data
- "test \"$(cat data/plugin_data/data-test/create-data)\" == successful"
# Test if it persists plugin data
- echo stop | docker run --rm -i -v $PWD/data:/data -v $PWD/testsuite/$TESTSUITE_VERSION/verify-data:/plugins local-pocketmine-mp
# Test if it downloads plugins
- "test $TEST_AGAINST '!=' master && echo stop | docker run --rm -i -v $PWD/data:/data -v $PWD/testsuite/$TESTSUITE_VERSION/verify-plugins:/plugins -e POCKETMINE_PLUGINS='PurePerms:1.4.2-c2a PureChat' local-pocketmine-mp"