Skip to content

Update dependencies #24

Update dependencies

Update dependencies #24

Workflow file for this run

name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
check_unix:
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