refactor configs and handlers, interceptors #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
tests: | |
name: Integration Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build and run chat server and tests in Docker | |
run: | | |
docker build -t chat-server . | |
docker run -d --name chat-server -p 8080:8080 -p 3478-3495:3478-3495/udp chat-server | |
- name: Wait for docker container to exit | |
run: | | |
while docker ps | grep chat-server >/dev/null; do | |
echo "chat-server is still running, waiting..." | |
sleep 5 | |
done | |
- name: Copy logs from container to host | |
run: | | |
docker cp chat-server:/usr/src/app/logs/. . | |
- name: Upload logs as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: logs | |
path: | | |
sfu.log | |
test.log | |
- name: Shutdown chat server | |
run: docker stop chat-server && docker rm chat-server | |
- name: Parse test results | |
run: ./scripts/parse_test_results.sh test.log |