Skip to content

...

... #6

Workflow file for this run

on:
pull_request:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build
run: cargo build
- name: start and hit no-ssl
shell: bash
run: |
./target/debug/cosock-test-server &
sleep 1
SERVER_PID=$!
curl http://127.0.0.1:8080/delay/3
kill $SERVER_PID
- name: install certs
run: |
openssl req \
-newkey rsa:2048 \
-x509 \
-sha256 \
-days 10000 \
-nodes \
-out cert.pem \
-keyout key.pem \
-subj "/C=US/ST=MN/L=Minneapolis/O=cosock/" \
&& cp cert.pem /usr/local/share/ca-certificates || ls /usr/local/share && exit 1 \
&& update-ca-certificates
- name: run-with-tls
run: |
./target/debug/cosock-test-server 8443 . &
sleep 1
SERVER_PID=$!
curl https://127.0.0.1:8080/delay/3
kill $SERVER_PID