Skip to content

Commit 492598c

Browse files
committed
try porting the old travis test to github actions
1 parent 8ca0f1e commit 492598c

File tree

2 files changed

+50
-30
lines changed

2 files changed

+50
-30
lines changed

.github/workflows/e2e-windows.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Test Wine
2+
3+
on:
4+
- pull_request
5+
6+
jobs:
7+
e2e:
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up JDK 8
14+
uses: actions/setup-java@v2
15+
with:
16+
java-version: '8'
17+
distribution: 'temurin'
18+
cache: maven
19+
- name: Set up Python 3.6
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.6'
23+
24+
- name: Build with Maven
25+
run: mvn -B package --file pom.xml
26+
- name: Show versions
27+
run: |
28+
uname -a
29+
python3 --version
30+
java -version
31+
- name: Setup e2e-windows environment
32+
run: |
33+
git clone https://github.com/Bytekeeper/sc-docker.git
34+
cp it/sc-docker-support/*.dockerfile sc-docker/docker/dockerfiles
35+
pushd sc-docker
36+
pip3 install numpy==1.16.6 wheel
37+
python3 setup.py bdist_wheel
38+
pip3 install dist/scbw*.whl
39+
cd docker
40+
./build_images.sh
41+
popd
42+
cp sc-docker/scbw/local_docker/starcraft.zip /tmp/sc-docker/starcraft.zip
43+
scbw.play --install
44+
45+
- name: Test the e2e-windows environment
46+
run: |
47+
sh mvnw clean install
48+
sh mvnw -f it/bots/pom.xml package
49+
for bot in $(ls -d it/bots/*/); do BOTNAME=$(basename $bot); echo "Setting up $BOTNAME"; mkdir -p "$HOME/.scbw/bots/$BOTNAME/AI" "$HOME/.scbw/bots/$BOTNAME/read" "$HOME/.scbw/bots/$BOTNAME/write"; cp it/sc-docker-support/BWAPI.dll "$HOME/.scbw/bots/$BOTNAME"; cp "$bot/target/"*-with-dependencies.jar "$HOME/.scbw/bots/$BOTNAME/AI"; cp "$bot/bot.json" "$HOME/.scbw/bots/$BOTNAME"; done
50+
scbw.play --headless --bots jbwapibot SittingDuck --timeout 180 --docker_image starcraft:game 2>&1 | grep 'Winner is BotPlayer:jbwapibot:T' || (cat $HOME/.scbw/games/*/logs_0/* && false)

0 commit comments

Comments
 (0)