Add an update_deps script and update the remaining indirect deps #36
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: Go | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
checks: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.17' | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
- name: Quickstart | |
shell: bash | |
run: | | |
function endtest () { | |
if [ "$RUNNER_OS" = "Windows" ]; then | |
taskkill -im $1 -f -t | |
else | |
killall $1 | |
fi | |
} | |
if [ "$RUNNER_OS" = "Windows" ]; then BIN=daemon.exe; else BIN=daemon; fi | |
(go build -o $BIN -v ./ && (mkdir -p quicktest && mv $BIN quicktest/)) || exit 1 | |
cd quicktest | |
echo "password" | ./$BIN spawn >logs.txt 2>&1 & sleep 5; endtest $BIN | |
cat logs.txt | |
if [ -z "$(grep 'Token received' logs.txt)" ]; then exit 2; fi | |
if [ -z "$(grep 'Obtained TLS lease' logs.txt)" ]; then exit 3; fi | |
if [ -z "$(grep 'https://127.0.0.1:8080/daemon/' logs.txt)" ]; then exit 4; fi |