Skip to content

Wire up live Cloudflare demo + real CRM screenshots #29

Wire up live Cloudflare demo + real CRM screenshots

Wire up live Cloudflare demo + real CRM screenshots #29

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
test:
name: Go test
runs-on: ubuntu-latest
env:
COVERAGE_THRESHOLD: "62"
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: gomyadmin
POSTGRES_PASSWORD: gomyadmin
POSTGRES_DB: gomyadmin
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Download dependencies
run: go mod download
- name: Test
env:
DATABASE_URL: postgres://gomyadmin:gomyadmin@localhost:5432/gomyadmin?sslmode=disable
run: |
PKGS="$(go list ./... | grep -Ev '/(examples|templates|tests/integration)(/|$)')"
go test $PKGS
- name: Integration tests
env:
DATABASE_URL: postgres://gomyadmin:gomyadmin@localhost:5432/gomyadmin?sslmode=disable
run: go test -tags integration ./tests/integration/... -timeout 120s
- name: Check coverage
env:
DATABASE_URL: postgres://gomyadmin:gomyadmin@localhost:5432/gomyadmin?sslmode=disable
run: |
PKGS="$(go list ./... | grep -Ev '/(examples|templates|tests/integration)(/|$)')"
go test $PKGS -coverprofile=coverage.out -timeout 120s
go tool cover -func=coverage.out | awk '/total:/ {pct=$3+0; threshold=ENVIRON["COVERAGE_THRESHOLD"]+0; if (pct < threshold) { print "Coverage " $3 " is below " threshold "%"; exit 1 } else { print "Coverage " $3 " OK" }}'
frontend:
name: Frontend build
runs-on: ubuntu-latest
defaults:
run:
working-directory: templates/frontend-next-shadcn
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v5
with:
node-version: 24
cache: yarn
cache-dependency-path: templates/frontend-next-shadcn/yarn.lock
- name: Install Yarn
run: |
if ! command -v yarn >/dev/null 2>&1; then
npm install -g yarn@1.22.22
fi
yarn --version
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Typecheck
run: yarn run typecheck
- name: Build
run: yarn run build