2021-02-21 15:32:02 +01:00
|
|
|
name: Websockets CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
|
2021-02-21 15:42:09 +01:00
|
|
|
jobs:
|
2021-02-21 15:32:02 +01:00
|
|
|
websocket_tests:
|
|
|
|
runs-on: ubuntu-20.04
|
2021-07-29 17:04:02 +02:00
|
|
|
timeout-minutes: 121
|
2021-02-21 15:32:02 +01:00
|
|
|
env:
|
|
|
|
VFLAGS: -cc tcc -no-retry-compilation
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt-get install --quiet -y libssl-dev
|
|
|
|
- name: Build v
|
|
|
|
run: |
|
|
|
|
echo $VFLAGS
|
|
|
|
sudo ln -s $PWD/thirdparty/tcc/tcc.exe /usr/local/bin/tcc ## TODO: remove
|
|
|
|
make -j4
|
2021-02-21 16:03:25 +01:00
|
|
|
./v -g -o v cmd/v
|
2021-02-21 15:32:02 +01:00
|
|
|
- name: v doctor
|
|
|
|
run: ./v doctor
|
|
|
|
- name: Run websockets tests
|
2021-07-03 01:56:00 +02:00
|
|
|
run: ./v -g test vlib/net/websocket/
|
2021-02-21 15:32:02 +01:00
|
|
|
|
2021-03-14 17:54:45 +01:00
|
|
|
## Autobahn integrations tests
|
2021-02-21 15:32:02 +01:00
|
|
|
- name: Run autobahn services
|
2021-07-03 01:56:00 +02:00
|
|
|
run: docker-compose -f ${{github.workspace}}/vlib/net/websocket/tests/autobahn/docker-compose.yml up -d
|
2021-03-14 17:54:45 +01:00
|
|
|
|
2021-03-10 15:34:22 +01:00
|
|
|
- name: Wait for the service to start
|
|
|
|
run: sleep 10s
|
2021-03-14 17:54:45 +01:00
|
|
|
|
|
|
|
- name: Build client test
|
2021-07-03 01:56:00 +02:00
|
|
|
run: docker exec autobahn_client "/src/v" "/src/vlib/net/websocket/tests/autobahn/autobahn_client.v"
|
2021-02-21 15:32:02 +01:00
|
|
|
- name: Run client test
|
2021-07-03 01:56:00 +02:00
|
|
|
run: docker exec autobahn_client "/src/vlib/net/websocket/tests/autobahn/autobahn_client"
|
2021-03-14 17:54:45 +01:00
|
|
|
|
2021-02-21 15:32:02 +01:00
|
|
|
- name: Build client wss test
|
2021-07-03 01:56:00 +02:00
|
|
|
run: docker exec autobahn_client "/src/v" "/src/vlib/net/websocket/tests/autobahn/autobahn_client_wss.v"
|
2021-03-14 17:54:45 +01:00
|
|
|
|
2021-02-21 15:32:02 +01:00
|
|
|
- name: Run client wss test
|
2021-07-03 01:56:00 +02:00
|
|
|
run: docker exec autobahn_client "/src/vlib/net/websocket/tests/autobahn/autobahn_client_wss"
|
2021-02-21 15:32:02 +01:00
|
|
|
- name: Run server test
|
|
|
|
run: docker exec autobahn_server "wstest" "-m" "fuzzingclient" "-s" "/config/fuzzingclient.json"
|
2021-03-14 17:54:45 +01:00
|
|
|
|
2021-02-21 15:32:02 +01:00
|
|
|
- name: Copy reports
|
|
|
|
run: docker cp autobahn_server:/reports ${{github.workspace}}/reports
|
|
|
|
- name: Copy reports wss
|
|
|
|
run: docker cp autobahn_server_wss:/reports ${{github.workspace}}/reports_wss
|
|
|
|
- name: Test success
|
|
|
|
run: docker exec autobahn_server "python" "/check_results.py"
|
|
|
|
- name: Test success WSS
|
|
|
|
run: docker exec autobahn_server_wss "python" "/check_results.py"
|
|
|
|
|
|
|
|
- name: Publish all reports
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: full report
|
|
|
|
path: ${{github.workspace}}/reports
|
2021-03-14 17:54:45 +01:00
|
|
|
|
2021-02-21 15:32:02 +01:00
|
|
|
- name: Publish report client
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: client
|
|
|
|
path: ${{github.workspace}}/reports/clients/index.html
|
2021-03-14 17:54:45 +01:00
|
|
|
|
2021-02-21 15:32:02 +01:00
|
|
|
- name: Publish report server
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: server
|
|
|
|
path: ${{github.workspace}}/reports/servers/index.html
|
2021-03-10 15:34:22 +01:00
|
|
|
|
2021-02-21 15:32:02 +01:00
|
|
|
- name: Publish all reports WSS
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: full report wss
|
|
|
|
path: ${{github.workspace}}/reports_wss
|
2021-03-10 15:34:22 +01:00
|
|
|
|
2021-02-21 15:32:02 +01:00
|
|
|
- name: Publish report client wss
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: client wss
|
|
|
|
path: ${{github.workspace}}/reports_wss/clients/index.html
|
|
|
|
|