Skip to content

Close sample client instantly on ctrl+c #318

Close sample client instantly on ctrl+c

Close sample client instantly on ctrl+c #318

Workflow file for this run

name: Integration tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
connect-to-server:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 3.1
uses: actions/setup-ruby@v1
with:
ruby-version: 3.1.x
- name: Prepare
run: |
curl https://raw.githubusercontent.com/ChillerDragon/teeworlds_network/master/.github/workflows/prepare.sh | bash
- name: '[CLIENT] Test sending chat messages'
run: |
./integration_test/run.sh client/chat.rb
- name: '[CLIENT] Test reconnect'
run: |
./integration_test/run.sh client/reconnect.rb
- name: '[CLIENT] Test rcon'
run: |
./integration_test/run.sh client/rcon.rb
- name: '[SERVER] Test connect'
run: |
./integration_test/run.sh server/connect.rb
# TODO: the ci refuses to pass two server tests in a row
# it works fine locally
# i see nothing suspicious via lsof/netstat/ls/tcpdump
# well tcpdump is sus as in on the run it fails it creates a 0 byte dump file
# - name: '[SERVER] Test chat'
# run: |
# sudo tcpdump -i lo "port 8377" -w dump.pcap &
# tcpdump_pid=$!
# fail=0
# if ! ./integration_test/run.sh server/chat.rb
# then
# fail=1
# fi
# kill -SIGINT $tcpdump_pid
# sleep 1
# file dump.pcap
# tcpdump -r dump.pcap -nX || true
# [[ "$fail" == "1" ]] && exit 1
srv-chat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 3.1
uses: actions/setup-ruby@v1
with:
ruby-version: 3.1.x
- name: Prepare
run: |
curl https://raw.githubusercontent.com/ChillerDragon/teeworlds_network/master/.github/workflows/prepare.sh | bash
- name: '[SERVER] Test chat'
run: |
./integration_test/run.sh server/chat.rb