Skip to content

Commit

Permalink
ci: extract piping-server-check server command
Browse files Browse the repository at this point in the history
  • Loading branch information
nwtgck committed May 3, 2023
1 parent cdf03f2 commit 22fc9e2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ jobs:
- name: Install piping-server-check
run: cd /tmp && wget -O piping-server-check.deb https://github.com/nwtgck/piping-server-check/releases/download/v${PIPING_SERVER_CHECK_VERSION}/piping-server-check-${PIPING_SERVER_CHECK_VERSION}-linux-amd64.deb && sudo dpkg -i piping-server-check.deb
- name: piping-server-check
run: piping-server-check --http1.0 --http1.0-tls --http1.1 --http1.1-tls --h2 --tls-skip-verify --compromise http1.0/multipart_form_data --compromise http1.0-tls/multipart_form_data --concurrency 100 --server-command='mkdir -p /tmp/logs && exec ./piping-server-pkg-linuxstatic-x64/piping-server --http-port=$HTTP_PORT --enable-https --https-port=$HTTPS_PORT --crt-path=/tmp/ssl_certs/server.crt --key-path=/tmp/ssl_certs/server.key 2>&1 | tee /tmp/logs/$(date "+%s%3N").log > /dev/stderr' --transfer-speed-byte $((1024 * 1024 * 1024 * 1024)) --transfer-span 3s --transfer-span 10s --transfer-span 1m --transfer-span 2m --transfer-span 3m
run: piping-server-check --http1.0 --http1.0-tls --http1.1 --http1.1-tls --h2 --tls-skip-verify --compromise http1.0/multipart_form_data --compromise http1.0-tls/multipart_form_data --concurrency 100 --server-command="${SERVER_COMMAND}" --transfer-speed-byte $((1024 * 1024 * 1024 * 1024)) --transfer-span 3s --transfer-span 10s --transfer-span 1m --transfer-span 2m --transfer-span 3m
env:
SERVER_COMMAND: 'mkdir -p /tmp/logs && exec ./piping-server-pkg-linuxstatic-x64/piping-server --http-port=$HTTP_PORT --enable-https --https-port=$HTTPS_PORT --crt-path=/tmp/ssl_certs/server.crt --key-path=/tmp/ssl_certs/server.key 2>&1 | tee /tmp/logs/$(date "+%s%3N").log > /dev/stderr'
timeout-minutes: 4.5
- name: Show server logs from piping-server-check
run: cat /tmp/logs/*
Expand All @@ -126,11 +128,13 @@ jobs:
run: cd /tmp/ && curl -L https://github.com/nwtgck/piping-server-check/releases/download/v${PIPING_SERVER_CHECK_VERSION}/piping-server-check-${PIPING_SERVER_CHECK_VERSION}-linux-amd64.tar.gz | tar xzf -
- name: piping-server-check
run: |
docker run --rm -i -v $PWD:/app -v /tmp/piping-server-check:/usr/local/bin/piping-server-check -v /tmp/shared:/tmp/shared alpine:3.14 /bin/sh << 'EOF'
docker run --rm -i -e SERVER_COMMAND="${SERVER_COMMAND}" -v $PWD:/app -v /tmp/piping-server-check:/usr/local/bin/piping-server-check -v /tmp/shared:/tmp/shared alpine:3.14 /bin/sh << 'EOF'
set -xeu
export GITHUB_ACTIONS=true
piping-server-check --http1.0 --http1.0-tls --http1.1 --http1.1-tls --h2 --tls-skip-verify --compromise http1.0/multipart_form_data --compromise http1.0-tls/multipart_form_data --concurrency 100 --server-command='mkdir -p /tmp/shared/logs && exec /app/piping-server-pkg-alpine-x64/piping-server --http-port=$HTTP_PORT --enable-https --https-port=$HTTPS_PORT --crt-path=/tmp/shared/ssl_certs/server.crt --key-path=/tmp/shared/ssl_certs/server.key 2>&1 | tee /tmp/shared/logs/$(date "+%s%3N").log > /dev/stderr' --transfer-speed-byte $((1024 * 1024 * 1024 * 1024)) --transfer-span 3s --transfer-span 10s --transfer-span 1m --transfer-span 2m --transfer-span 3m
piping-server-check --http1.0 --http1.0-tls --http1.1 --http1.1-tls --h2 --tls-skip-verify --compromise http1.0/multipart_form_data --compromise http1.0-tls/multipart_form_data --concurrency 100 --server-command="${SERVER_COMMAND}" --transfer-speed-byte $((1024 * 1024 * 1024 * 1024)) --transfer-span 3s --transfer-span 10s --transfer-span 1m --transfer-span 2m --transfer-span 3m
EOF
env:
SERVER_COMMAND: 'mkdir -p /tmp/shared/logs && exec /app/piping-server-pkg-alpine-x64/piping-server --http-port=$HTTP_PORT --enable-https --https-port=$HTTPS_PORT --crt-path=/tmp/shared/ssl_certs/server.crt --key-path=/tmp/shared/ssl_certs/server.key 2>&1 | tee /tmp/shared/logs/$(date "+%s%3N").log > /dev/stderr'
timeout-minutes: 4.5
- name: Show server logs from piping-server-check
run: cat /tmp/shared/logs/*
Expand All @@ -150,7 +154,9 @@ jobs:
- name: Install piping-server-check
run: cd /tmp && curl -L https://github.com/nwtgck/piping-server-check/releases/download/v${PIPING_SERVER_CHECK_VERSION}/piping-server-check-${PIPING_SERVER_CHECK_VERSION}-darwin-amd64.tar.gz | tar xf - && sudo mv piping-server-check /usr/local/bin
- name: piping-server-check
run: piping-server-check --http1.0 --http1.0-tls --http1.1 --http1.1-tls --h2 --tls-skip-verify --compromise http1.0/multipart_form_data --compromise http1.0-tls/multipart_form_data --concurrency 100 --server-command='mkdir -p /tmp/logs && exec ./piping-server-pkg-mac-x64/piping-server --http-port=$HTTP_PORT --enable-https --https-port=$HTTPS_PORT --crt-path=/tmp/ssl_certs/server.crt --key-path=/tmp/ssl_certs/server.key 2>&1 | tee /tmp/logs/$(date "+%s%3N").log > /dev/stderr' --transfer-speed-byte $((1024 * 1024 * 1024 * 1024)) --transfer-span 3s --transfer-span 10s --transfer-span 1m --transfer-span 2m --transfer-span 3m
run: piping-server-check --http1.0 --http1.0-tls --http1.1 --http1.1-tls --h2 --tls-skip-verify --compromise http1.0/multipart_form_data --compromise http1.0-tls/multipart_form_data --concurrency 100 --server-command="${SERVER_COMMAND}" --transfer-speed-byte $((1024 * 1024 * 1024 * 1024)) --transfer-span 3s --transfer-span 10s --transfer-span 1m --transfer-span 2m --transfer-span 3m
env:
SERVER_COMMAND: 'mkdir -p /tmp/logs && exec ./piping-server-pkg-mac-x64/piping-server --http-port=$HTTP_PORT --enable-https --https-port=$HTTPS_PORT --crt-path=/tmp/ssl_certs/server.crt --key-path=/tmp/ssl_certs/server.key 2>&1 | tee /tmp/logs/$(date "+%s%3N").log > /dev/stderr'
timeout-minutes: 4.5
- name: Show server logs from piping-server-check
run: cat /tmp/logs/*
Expand Down

0 comments on commit 22fc9e2

Please sign in to comment.