mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 16:04:01 +00:00
Preserve request parameters, tool-call completion reasons and retry session affinity. Bound upstream header waits, stop expired-context scans and add opt-in redacted request-body diagnostics. Isolate Playground diagnostics from production pools, report stream failures accurately, align readiness with discoverable models and honor Docker listen configuration. Split Go and WebUI modules by responsibility, add regression tests and CI, standardize formatting and rewrite the English and Chinese READMEs. Refs: #6, #18, #19, #20, #21, #22, #23, #24, #25
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
name: Checks
|
|
|
|
on:
|
|
push:
|
|
branches: ["**"]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: checks-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: Go ${{ matrix.go }} / ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
go: ["1.24.x", stable]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
cache: true
|
|
- name: Vet
|
|
run: go vet ./...
|
|
- name: Test with race detection
|
|
if: runner.os == 'Linux'
|
|
run: go test -race -coverprofile=coverage.out ./...
|
|
- name: Test on Windows
|
|
if: runner.os == 'Windows'
|
|
run: go test ./...
|
|
- name: Build
|
|
run: go build ./...
|
|
|
|
format:
|
|
name: Formatting and WebUI syntax
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: npm
|
|
- run: npm ci --ignore-scripts
|
|
- name: Check Go formatting
|
|
shell: bash
|
|
run: |
|
|
unformatted="$(gofmt -l .)"
|
|
if [ -n "$unformatted" ]; then
|
|
printf '%s\n' "$unformatted"
|
|
exit 1
|
|
fi
|
|
- run: npm run format:check
|
|
- run: npm run check:web
|
|
- name: Check container entrypoint syntax
|
|
run: sh -n docker-entrypoint.sh
|