add macos latest runner to test workflow #16
This file contains hidden or 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
| on: | |
| pull_request: | |
| push: | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: build | |
| run: cargo build | |
| - name: start and hit no-ssl | |
| shell: bash | |
| run: | | |
| ./target/debug/cosock-test-server & | |
| SERVER_PID=$! | |
| sleep 1 | |
| curl http://127.0.0.1:8080/delay/3 | |
| kill $SERVER_PID | |
| - name: run-with-tls | |
| run: | | |
| ./target/debug/cosock-test-server 8443 . & | |
| SERVER_PID=$! | |
| sleep 1 | |
| curl -k https://127.0.0.1:8443/delay/3 --cacert ./cert.pem | |
| EXIT_CODE=$? | |
| kill $SERVER_PID | |
| exit $EXIT_CODE |