File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Why CircleCI? Because Node 18 on GitHub Actions fails. Transfer via Piping Server for about 25 seconds fails by TCP RST. Node 12, 14, 16 work fine on GitHub Actions.
2+
3+ version : 2.1
4+
5+ orbs :
6+ node : circleci/node@4.7
7+
8+ executors :
9+ linux :
10+ machine :
11+ image : ubuntu-2004:202107-02
12+
13+ jobs :
14+ test :
15+ parameters :
16+ node-version :
17+ type : string
18+ environment :
19+ PIPING_SERVER_CHECK_VERSION : 0.11.0
20+ executor : linux
21+ steps :
22+ - checkout
23+ - node/install :
24+ node-version : << parameters.node-version >>
25+ - run : npm ci
26+ - run : npm run lint
27+ - run : npm run build
28+ - run : npm test
29+ - run :
30+ name : Create certificates
31+ command : cd /tmp && mkdir ssl_certs && cd ssl_certs && openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -sha256 -nodes --subj '/CN=localhost/'
32+ - run :
33+ name : Install piping-server-check
34+ command : 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
35+ - run :
36+ name : piping-server-check
37+ command : piping-server-check --http1.1 --http1.1-tls --h2 --tls-skip-verify --compromise get_cancel_get --concurrency 100 --server-command="${SERVER_COMMAND}" --n-simultaneous-requests=60 --transfer-speed-byte $((1024 * 1024 * 1024 * 1024)) --transfer-span 3s --transfer-span 10s --transfer-span 1m
38+ environment :
39+ SERVER_COMMAND : ' mkdir -p /tmp/logs && exec node ./dist/src/index.js --http-port=$HTTP_PORT --enable-https=true --https-port=$HTTPS_PORT --key-path=/tmp/ssl_certs/server.key --crt-path=/tmp/ssl_certs/server.crt 2>&1 | tee /tmp/logs/$(date "+%s%3N").log > /dev/stderr'
40+ no_output_timeout : 3m
41+ - run :
42+ when : always
43+ name : Show server logs from piping-server-check
44+ command : tail -n +1 /tmp/logs/*
45+
46+ workflows :
47+ all-tests :
48+ jobs :
49+ - test :
50+ matrix :
51+ parameters :
52+ node-version : ["14", "16", "18"]
You can’t perform that action at this time.
0 commit comments