Repository navigation
fix: 加密会话遇到原账号模型短暂冷却时返回重试时间 #3948
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Multi-host full application bootstrap | |
| on: | |
| push: | |
| branches: [production] | |
| tags: ['v*'] | |
| pull_request: | |
| workflow_dispatch: | |
| # PR updates replace older runs; other events keep a separate group per commit. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| actions: read | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| outputs: | |
| isolated-real-applications: ${{ steps.select.outputs['isolated-real-applications'] }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install selector dependency | |
| run: python3 -m pip install PyYAML==6.0.3 | |
| - name: Select affected checks | |
| id: select | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: python3 .github/ci/select_jobs.py multihost-fullapp.yml | |
| isolated-real-applications: | |
| needs: changes | |
| if: needs.changes.outputs['isolated-real-applications'] == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 35 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: backend/go.mod | |
| check-latest: false | |
| cache: true | |
| cache-dependency-path: backend/go.sum | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Build actual cmd/server for the isolated runner only | |
| working-directory: backend | |
| env: | |
| CGO_ENABLED: '0' | |
| GOMAXPROCS: '1' | |
| GOFLAGS: '-p=1' | |
| run: | | |
| set -euo pipefail | |
| fullapp_fixture_dir="$RUNNER_TEMP/sub2api-fullapp" | |
| mkdir -p "$fullapp_fixture_dir" | |
| fullapp_fixture_commit="$(git rev-parse HEAD)" | |
| go build -trimpath -ldflags="-X main.Commit=$fullapp_fixture_commit" \ | |
| -o "$fullapp_fixture_dir/sub2api" ./cmd/server | |
| echo "FULLAPP_BIN=$fullapp_fixture_dir/sub2api" >> "$GITHUB_ENV" | |
| echo "FULLAPP_EXPECTED_COMMIT=$fullapp_fixture_commit" >> "$GITHUB_ENV" | |
| echo "FULLAPP_REPORT=$fullapp_fixture_dir/result.json" >> "$GITHUB_ENV" | |
| - name: Fetch checksum-pinned Caddy 2.11.7 | |
| run: | | |
| set -euo pipefail | |
| fullapp_fixture_dir="$RUNNER_TEMP/sub2api-fullapp" | |
| curl --fail --location --silent --show-error \ | |
| --retry 3 --retry-delay 2 --retry-max-time 120 \ | |
| --connect-timeout 10 --max-time 90 \ | |
| https://github.com/caddyserver/caddy/releases/download/v2.11.7/caddy_2.11.7_linux_amd64.tar.gz \ | |
| --output "$fullapp_fixture_dir/caddy.tar.gz" | |
| echo '727b91701a392de6ebc5027509f548bf39979e5216340d0faed8fa5e69c84f8b '"$fullapp_fixture_dir/caddy.tar.gz" | sha256sum --check --strict | |
| tar -xzf "$fullapp_fixture_dir/caddy.tar.gz" -C "$fullapp_fixture_dir" caddy | |
| echo "CADDY_BIN=$fullapp_fixture_dir/caddy" >> "$GITHUB_ENV" | |
| - name: Initialize two full Sub2API applications and real Caddy in isolation | |
| timeout-minutes: 15 | |
| run: python3 deploy/traffic/test_fullapp_bootstrap.py | |
| - name: Build isolated seed and model fixture only | |
| working-directory: backend | |
| env: | |
| CGO_ENABLED: '0' | |
| GOMAXPROCS: '1' | |
| GOFLAGS: '-p=1' | |
| run: | | |
| set -euo pipefail | |
| go build -tags=fullappfixture -trimpath \ | |
| -o "$RUNNER_TEMP/sub2api-fullapp/fullapp-fixture" ./cmd/fullapp-fixture | |
| echo "FULLAPP_FIXTURE_BIN=$RUNNER_TEMP/sub2api-fullapp/fullapp-fixture" >> "$GITHUB_ENV" | |
| - name: Authenticated lifecycle, EOF boundaries and shared queued cancellation through two complete applications | |
| timeout-minutes: 15 | |
| env: | |
| FULLAPP_REPORT: ${{ runner.temp }}/sub2api-fullapp/model-result.json | |
| run: python3 deploy/traffic/test_fullapp_models.py | |
| - name: Save bounded fixture metadata, no config or application logs | |
| if: always() | |
| run: | | |
| if [ -f "$RUNNER_TEMP/sub2api-fullapp/result.json" ]; then | |
| cat "$RUNNER_TEMP/sub2api-fullapp/result.json" | |
| fi | |
| if [ -f "$RUNNER_TEMP/sub2api-fullapp/model-result.json" ]; then | |
| cat "$RUNNER_TEMP/sub2api-fullapp/model-result.json" | |
| fi |