Files
tiennm99 7008a57cf5 refactor!: rebrand miti99bot to tiennm99bot
BREAKING CHANGE: the Go module path is now github.com/tiennm99/tiennm99bot,
the default sticker pack is stickers_by_<bot username>, and the health body,
deploy DM, User-Agents and image names say tiennm99bot.
2026-10-07 15:14:02 +07:00

103 lines
2.8 KiB
YAML

name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
go:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.26.5']
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
cache: true
- name: go vet
run: go vet ./...
# Pinning the lint binary to v2.12.x because our .golangci.yml targets
# Go 1.26 and earlier v2.x releases were built against older Go versions,
# which the lint config rejects with "Go language version used to build
# golangci-lint is lower than the targeted Go version".
# Action v9 is the first Node 24-native release; still accepts any
# golangci-lint >= v2.1.0.
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.12.2
# govulncheck is informational — failures don't block the build because
# stdlib CVEs surface routinely until the runner image catches up to
# the latest go-patch release. The signal we care about is dependency
# vulns, which we react to via go.mod bumps.
- name: govulncheck
continue-on-error: true
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
# Testcontainers provisions MongoDB 8 through the runner's Docker daemon;
# MONGODB_TEST_URL is intentionally unset so CI exercises that path.
- name: go test
env:
# Quiet test logs so real failures stand out.
LOG_LEVEL: error
run: go test -race -count=1 -coverprofile=cov.out ./...
- name: coverage summary
run: go tool cover -func=cov.out | tail -1
- name: go build
run: go build ./...
- name: docker build
run: docker build -t tiennm99bot .
renderer:
runs-on: ubuntu-latest
defaults:
run:
working-directory: renderer
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache-dependency-path: renderer/package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm test
- name: Install Remotion browser runtime libraries
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libnspr4 \
libnss3 \
libgtk-3-0 \
libgbm1 \
libasound2t64 \
libxshmfence1 \
fonts-noto
- run: npm run browser:ensure
- run: npm run render:smoke
- run: npm run api:smoke
- name: docker build
run: docker build -t tiennm99bot-renderer .