mirror of
https://github.com/tiennm99/gomoku.git
synced 2026-05-27 10:00:48 +00:00
971371d544
Two jobs on push/PR to main (paths-ignore: docs, plans, markdown): - server: go vet + go test + go build (Go 1.23) - client: npm ci + npm run build (Node 22)
60 lines
1.1 KiB
YAML
60 lines
1.1 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths-ignore:
|
|
- "**.md"
|
|
- ".gitignore"
|
|
- "plans/**"
|
|
- "docs/**"
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
server:
|
|
name: Go server — vet + test + build
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: server
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.23"
|
|
|
|
- name: Download modules
|
|
run: go mod download
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|
|
|
|
- name: Test
|
|
run: go test ./... -count=1
|
|
|
|
- name: Build
|
|
run: go build ./...
|
|
|
|
client:
|
|
name: Node client — install + build
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: client
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: npm
|
|
cache-dependency-path: client/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build
|
|
run: npm run build
|