This repository has been archived by the owner on Aug 3, 2024. It is now read-only.
build(deps-dev): bump postcss from 8.4.21 to 8.4.31 in /internal/server/web #84
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Tunnel Tests | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20.1" | |
cache: true | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 7.27.1 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.12.1 | |
cache: "pnpm" | |
cache-dependency-path: "**/pnpm-lock.yaml" | |
- name: Add hosts to /etc/hosts | |
run: | | |
sudo echo "127.0.0.1 test.localhost" | sudo tee -a /etc/hosts | |
sudo echo "127.0.0.1 xxyyzz.localhost" | sudo tee -a /etc/hosts | |
- name: Build frontend | |
run: | | |
npm i -g pnpm | |
pnpm install --dir internal/server/web --frozen-lockfile && pnpm run --dir internal/server/web build | |
- name: Build client and server | |
run: | | |
go build -ldflags="-s -w" -o beaver ./cmd/beaver_client | |
go build -ldflags="-s -w" -o beaver_server ./cmd/beaver_server | |
go build -ldflags="-s -w" -o test_server ./tests/server.go | |
- name: Prepare test database | |
run: | | |
mv tests/data . | |
- name: Start test servers | |
run: | | |
./test_server & | |
sleep 5 | |
./beaver_server --config docs/beaver_server.yaml & | |
sleep 5 | |
- name: Start test client | |
run: | | |
./beaver --config tests/beaver_client.yaml http 9999 --subdomain test & | |
sleep 3 | |
- name: Run tests | |
run: go test -v ./tests/... | |
- name: Kill test servers | |
run: | | |
make kill-test-servers |