Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2e8470e
feat(leaderboards): add clan capital gold ranking
MagicTheDev Aug 31, 2026
e86858c
fix(api): keep capital gold ingestion in tracking
MagicTheDev Aug 31, 2026
e4dc42d
test(api): cover capital gold routes
MagicTheDev Aug 31, 2026
c8457e6
Codex worktree snapshot: archive-cleanup
MagicTheDev Sep 4, 2026
311584d
Preserve current Effect rewrite implementation for repo handoff
MagicTheDev Sep 6, 2026
b4ef578
feat: prepare Worker API for release
MagicTheDev Sep 6, 2026
3ae5ccf
fix: restore Swagger introduction
MagicTheDev Sep 6, 2026
5c84da9
chore: align API release version
MagicTheDev Sep 6, 2026
9523dc4
fix: satisfy API security checks
MagicTheDev Sep 6, 2026
a9d24a4
docs: remove obsolete repository guides
MagicTheDev Sep 6, 2026
f89281a
fix: configure Worker deployment
MagicTheDev Sep 6, 2026
c80104a
fix: remove worker background dependencies
MagicTheDev Sep 6, 2026
55eb6b6
test: update private proxy origin
MagicTheDev Sep 6, 2026
17cd2fc
fix: use canonical rows for database coordination
MagicTheDev Sep 6, 2026
4f80cf2
fix: order discord cache observations
MagicTheDev Sep 6, 2026
d2ac65b
fix: require worker auth secrets
MagicTheDev Sep 6, 2026
1201a28
feat: complete Effect worker API rewrite
MagicTheDev Sep 9, 2026
77ad809
fix: preserve immutable API package releases
MagicTheDev Sep 9, 2026
2a8d2bc
feat: automate versioned API releases
MagicTheDev Sep 9, 2026
0182dd4
fix: pin API CI to compatible schema
MagicTheDev Sep 9, 2026
1a742d5
fix: harden local auth synchronization
MagicTheDev Sep 9, 2026
29097e1
fix: stream PostgreSQL reads without deadlock
MagicTheDev Sep 9, 2026
d5154ee
fix: address worker review findings
MagicTheDev Sep 9, 2026
867a1d1
refactor: load static metadata from r2
MagicTheDev Sep 9, 2026
2467b32
fix: load roster metadata after authorization
MagicTheDev Sep 9, 2026
bd5c0a7
test: provide roster metadata fixtures
MagicTheDev Sep 9, 2026
61faa97
test: seed league metadata fixtures
MagicTheDev Sep 9, 2026
e56bd7a
test: seed static metadata in sql suites
MagicTheDev Sep 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 0 additions & 10 deletions .dockerignore

This file was deleted.

118 changes: 56 additions & 62 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,92 +2,86 @@ name: CI

on:
pull_request:
branches: [main, master]
branches: [main]
push:
branches: [main, master]
branches: [main]

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
# --- Build ------------------------------------------------------------------
build:
name: Build
typescript:
name: TypeScript Worker and packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Checkout clashy.go
uses: actions/checkout@v6
with:
repository: ClashKingInc/clashy.go
path: clashy.go

- name: Fix replace directive
run: go mod edit -replace github.com/clashkinginc/clashy.go=./clashy.go
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v5
- uses: actions/setup-node@v6
with:
go-version-file: go.mod
cache: true

- name: Build
run: go build ./...

# --- Vet --------------------------------------------------------------------
vet:
name: Vet
node-version: 26
cache: npm

- name: Install dependencies
run: npm ci --strict-peer-deps

- name: Require a new unused API package version
if: github.event_name == 'pull_request'
run: node scripts/api-release-version.mjs check-pr "origin/${{ github.base_ref }}"

- name: Validate contracts, client, and Worker
run: |
npm run typecheck
npm test
npm run test:scripts
npm run test:archive-runtime
npm run lint
npm run openapi:check
npm run build

postgres:
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
name: Authoritative PostgreSQL integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Checkout clashy.go
# This immutable revision is the schema contract from DevKit PR #20.
# API_SCHEMA_TEST_REF remains an explicit transition override once that
# contract is present on DevKit main.
- name: Checkout authoritative schema and fixture harness
uses: actions/checkout@v6
with:
repository: ClashKingInc/clashy.go
path: clashy.go
repository: ClashKingInc/DevKit
ref: ${{ vars.API_SCHEMA_TEST_REF || '0858f8c830fae71fec944d1884a059f5fcc4743c' }}
path: .schema-test
token: ${{ secrets.SCHEMA_REPO_TOKEN || github.token }}

- name: Fix replace directive
run: go mod edit -replace github.com/clashkinginc/clashy.go=./clashy.go
- name: Validate schema fixture checkout
run: bash scripts/test-postgres.sh --check .schema-test

- name: Setup Go
uses: actions/setup-go@v5
- uses: actions/setup-node@v6
with:
go-version-file: go.mod
cache: true
node-version: 26
cache: npm

- name: Vet
run: go vet ./...

# --- Tests ------------------------------------------------------------------
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Checkout clashy.go
uses: actions/checkout@v6
- uses: actions/setup-go@v5
with:
repository: ClashKingInc/clashy.go
path: clashy.go
go-version-file: .schema-test/database/go.mod
cache: false

- name: Fix replace directive
run: go mod edit -replace github.com/clashkinginc/clashy.go=./clashy.go
- name: Install pinned Goose and API dependencies
run: |
go install github.com/pressly/goose/v3/cmd/goose@v3.26.0
npm ci --strict-peer-deps
npm run build --workspace @clashking/api-contracts

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true

- name: Run tests
run: go test -coverprofile=coverage.out ./...
- name: Validate database runner wiring
run: npm run test:scripts

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.out
- name: Run each suite against a fresh migrated Timescale database
run: npm run test:postgres:all -- .schema-test
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
125 changes: 0 additions & 125 deletions .github/workflows/main.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/release-api-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Release API packages

on:
release:
types: [published]
workflow_call:
inputs:
release_tag:
description: Existing GitHub Release tag to package
required: true
type: string
workflow_dispatch:
inputs:
release_tag:
description: Existing GitHub Release tag to rebuild and upload
required: true
type: string

permissions:
contents: write

concurrency:
group: api-package-release-${{ github.event.release.tag_name || inputs.release_tag }}
cancel-in-progress: false

jobs:
package:
runs-on: ubuntu-latest
env:
RELEASE_TAG: ${{ github.event.release.tag_name || inputs.release_tag }}
steps:
- uses: actions/checkout@v6
with:
ref: refs/tags/${{ env.RELEASE_TAG }}

- uses: actions/setup-node@v6
with:
node-version: 26
cache: npm

- run: npm ci --strict-peer-deps
- run: node --test scripts/api-package-release.test.mjs
- run: npm run typecheck && npm test && npm run test:scripts && npm run lint
- run: npm run openapi:check
- name: Record the checked-out release commit
run: echo "SOURCE_COMMIT=$(git rev-parse HEAD)" >> "$GITHUB_ENV"
- name: Build and pack the matching release packages
id: packages
env:
SOURCE_TAG: ${{ env.RELEASE_TAG }}
run: node scripts/api-package-release.mjs prepare

- name: Preserve the exact release artifacts and manifest
uses: actions/upload-artifact@v4
with:
name: api-packages-${{ github.sha }}-${{ github.run_attempt }}
path: ${{ steps.packages.outputs.directory }}
if-no-files-found: error

- name: Verify and attach immutable archives to the GitHub Release
env:
PACKAGE_DIRECTORY: ${{ steps.packages.outputs.directory }}
SOURCE_TAG: ${{ env.RELEASE_TAG }}
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
node scripts/api-package-release.mjs verify "$PACKAGE_DIRECTORY"
gh release upload "$RELEASE_TAG" "$PACKAGE_DIRECTORY"/*.tgz "$PACKAGE_DIRECTORY/manifest.json"
Loading
Loading