Skip to content

Commit

Permalink
Merge pull request #377 from win5923/fix-unittest
Browse files Browse the repository at this point in the history
fix unit-test
  • Loading branch information
thijsvanloef authored Feb 14, 2024
2 parents 0eb68b2 + a67fb1a commit e04b34e
Showing 1 changed file with 11 additions and 31 deletions.
42 changes: 11 additions & 31 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on: # yamllint disable-line rule:truthy
pull_request:
workflow_call:

concurrency:
group: '${{ github.workflow }} @ ${{ github.ref }}'
cancel-in-progress: true

jobs:
unit-test-amd64:
name: Docker - Test (amd64)
Expand All @@ -30,19 +34,7 @@ jobs:
-p 27015:27015/udp \
-p 25575:25575/tcp \
-v ./palworld:/palworld/ \
-e PUID=1000 \
-e PGID=1000 \
-e PORT=8211 \
-e PLAYERS=16 \
-e MULTITHREADING=true \
-e RCON_ENABLED=true \
-e RCON_PORT=25575 \
-e TZ=UTC \
-e ADMIN_PASSWORD="adminPasswordHere" \
-e SERVER_PASSWORD="worldofpals" \
-e COMMUNITY=false \
-e SERVER_NAME="World of Pals" \
-e SERVER_DESCRIPTION="palworld-server-docker by Thijs van Loef" \
--env-file .env.example \
--restart unless-stopped \
--stop-timeout 30 \
${{ github.run_id }}
Expand Down Expand Up @@ -79,7 +71,7 @@ jobs:
nc -z -u -v 127.0.0.1 27015 || exit 1
nc -z -v 127.0.0.1 25575 || exit 1
- name: Test the backup command functions
- name: Test the backup script
run: |
docker exec palworld-server backup
if [ ! -f ./palworld/backups/palworld-save-*.tar.gz ]; then
Expand Down Expand Up @@ -117,7 +109,7 @@ jobs:
with:
file: ./Dockerfile
load: true
tags: ${{ github.run_id }}
tags: ${{ github.run_id }}:arm64
platforms: linux/arm64

- name: Run server
Expand All @@ -129,26 +121,14 @@ jobs:
-p 27015:27015/udp \
-p 25575:25575/tcp \
-v ./palworld:/palworld/ \
-e PUID=1000 \
-e PGID=1000 \
-e PORT=8211 \
-e PLAYERS=16 \
-e MULTITHREADING=true \
-e RCON_ENABLED=true \
-e RCON_PORT=25575 \
-e TZ=UTC \
-e ADMIN_PASSWORD="adminPasswordHere" \
-e SERVER_PASSWORD="worldofpals" \
-e COMMUNITY=false \
-e SERVER_NAME="World of Pals" \
-e SERVER_DESCRIPTION="palworld-server-docker by Thijs van Loef" \
--env-file .env.example \
--restart unless-stopped \
--stop-timeout 30 \
${{ github.run_id }}
${{ github.run_id }}:arm64
- name: Wait for server to start
run: |
TIMEOUT_SECONDS=400
TIMEOUT_SECONDS=600
START_TIME=$(date +%s)
while ! docker logs palworld-server 2>&1 | grep -q "Setting breakpad minidump AppID"; do
Expand Down Expand Up @@ -178,7 +158,7 @@ jobs:
nc -z -u -v 127.0.0.1 27015 || exit 1
nc -z -v 127.0.0.1 25575 || exit 1
- name: Test the backup command functions
- name: Test the backup script
run: |
docker exec palworld-server backup
if [ ! -f ./palworld/backups/palworld-save-*.tar.gz ]; then
Expand Down

0 comments on commit e04b34e

Please sign in to comment.