Skip to content

fixes #576

fixes #576 #23

Workflow file for this run

# workflow to build & test on each commit to develop or PR to develop
name: Build
on:
pull_request:
branches:
- 'develop'
push:
branches:
- 'develop'
jobs:
test:
strategy:
matrix:
go-version: [1.22.x]
node-version: [18]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
# build the binary (fast)
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
check-latest: true
cache: true
- run: go test ./...
- run: mkdir -p dist/
- run: go mod tidy && CGO_ENABLED=1 GOARCH=amd64 GOOS=linux go build -ldflags='-s -w -extldflags "-static"' -o dist/craig-stars main.go
- run: make build_wasm
# build the frontend (slow)
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- run: npm install
working-directory: ./frontend
- run: npm run test
working-directory: ./frontend
- run: npm run build
working-directory: ./frontend