ChillerDragon
dfcde01257
yaml anchors are not supported by github and every other deduplication seems to require creating a new action as in a own repo with releases
69 lines
1.9 KiB
YAML
69 lines
1.9 KiB
YAML
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
|