-
Notifications
You must be signed in to change notification settings - Fork 6
57 lines (47 loc) · 1.26 KB
/
ci.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
name: CI
on:
push:
branches:
- develop
- hotfix/**
- release/**
- test/**
pull_request:
workflow_dispatch:
jobs:
compile-then-run-tests:
name: Compile scala, run server, run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Install and configure pipenv
run: |
PYTHON_PATH=$(which python)
pip install pipenv
pipenv --python $PYTHON_PATH
- name: Run setup script
run: ./scripts/setup
- name: Run server
run: |
./scripts/server >/dev/null 2>&1 &
echo "SERVER_PID=$!" >> "$GITHUB_ENV"
- name: Check server
run: |
if ps -p "${SERVER_PID}" > /dev/null; then
echo "Server script is running with PID: ${SERVER_PID}"
else
echo "Server script is not running."
exit 1
fi
curl localhost:8090/ping
- name: Stop server
run: |
echo "Stopping Server by killing $SERVER_PID"
kill $SERVER_PID