# Checks for every push and pull request. The same steps run locally with # "make check", "make test-postgres" and "make miniapp". name: ci on: push: pull_request: permissions: contents: read jobs: go: name: Go (SQLite, race detector) runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: actions/setup-go@v7 with: go-version-file: go.mod - name: gofmt run: make fmt - name: go vet run: go vet ./... # Every catalog has every message of the source, with the same # placeholders, tags and commands; no message is unused and no used # message is missing. This is the translation completeness check. - name: Translations run: go test -count=1 ./locales/ ./internal/i18n/ - name: Tests run: go test -race -count=1 ./... postgres: name: Go (Postgres) runs-on: ubuntu-latest services: postgres: image: postgres:16 env: POSTGRES_USER: dlbot POSTGRES_PASSWORD: dlbot POSTGRES_DB: dlbot_test ports: ["5432:5432"] options: >- --health-cmd "pg_isready -U dlbot" --health-interval 5s --health-timeout 5s --health-retries 10 steps: - uses: actions/checkout@v7 - uses: actions/setup-go@v7 with: go-version-file: go.mod - name: Tests run: make test-postgres PG_DSN='postgres://dlbot:dlbot@127.0.0.1:5432/dlbot_test?sslmode=disable' miniapp: name: Mini App runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: actions/setup-node@v7 with: node-version: 24 cache: npm cache-dependency-path: web/miniapp/package-lock.json - uses: actions/setup-go@v7 with: go-version-file: go.mod - name: Build run: make miniapp # The committed build must be what the sources produce. - name: Build is committed run: git diff --exit-code -- web/miniapp/dist - name: Browser test run: | npx --prefix web/miniapp playwright-core install --with-deps chromium web/miniapp/e2e/run.sh