Fix message model routing #243
Workflow file for this run
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: Upload | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: {} | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 | |
| with: | |
| node-version: 24 | |
| package-manager-cache: false | |
| - name: Enable Corepack | |
| run: | | |
| corepack enable | |
| corepack prepare yarn@4.12.0 --activate | |
| yarn --version | |
| - uses: calcit-lang/setup-calcit@704b3f5cd6f9ce3bd1e0c926dbdd1d181adb8180 # v1.4.0 | |
| with: | |
| tools: calcit,caps | |
| - name: Resolve Calcit dependencies | |
| run: caps --strict --ci | |
| - name: Install JavaScript dependencies | |
| run: yarn install --immutable | |
| - name: Verify Calcit toolchain | |
| run: caps verify --toolchain | |
| - name: Check canonical Calcit snapshot | |
| run: | | |
| before="$(sha256sum calcit.cirru | cut -d ' ' -f 1)" | |
| calcit calcit.cirru edit format | |
| after="$(sha256sum calcit.cirru | cut -d ' ' -f 1)" | |
| test "$before" = "$after" | |
| git diff --exit-code -- calcit.cirru | |
| - name: Check Calcit types | |
| run: calcit calcit.cirru --check-only | |
| - name: Check application dynamic methods | |
| run: calcit calcit.cirru analyze dynamic-methods --max 0 --format json | |
| - name: Check deprecated Calcit APIs | |
| run: calcit calcit.cirru analyze deprecated --summary-only | |
| - name: Audit provider dynamic methods | |
| run: calcit calcit.cirru analyze dynamic-methods --deps --format json | |
| - name: Check Calcit quality baseline | |
| run: calcit calcit.cirru analyze quality --baseline config/calcit-quality.cirru | |
| - name: Run Calcit regression tests | |
| run: calcit calcit.cirru test --require-match --summary-only --format json | |
| - name: Build extension package | |
| run: yarn build | |
| - name: Validate extension package | |
| run: | | |
| test -f extension/dist/index.html | |
| find extension/dist/assets -maxdepth 1 -name '*.css' -print -quit | grep -q . | |
| find extension/dist/assets -maxdepth 1 -name 'gemini-icon-*.png' -print -quit | grep -q . | |
| find extension/dist/assets -maxdepth 1 -name 'axios-*.js' -print -quit | grep -q . | |
| node --check extension/service-worker.js | |
| node --check extension/get-selected.mjs | |
| node -e 'const manifest = require("./extension/manifest.json"); if (manifest.manifest_version !== 3 || manifest.side_panel?.default_path !== "dist/index.html" || manifest.content_scripts || manifest.permissions.includes("tabs")) process.exit(1)' | |
| test -z "$(grep -E 'https?://' extension/dist/index.html)" | |
| test -z "$(grep -E 'axios-' extension/dist/index.html)" | |
| test -z "$(grep -R 'feathericons.com' extension/dist/assets || true)" | |
| - name: Select deployment path | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| id: deploy-path | |
| env: | |
| REPOSITORY: ${{ github.repository }} | |
| run: | | |
| echo "dest=rsync-user@tiye.me:/web-assets/repo/${REPOSITORY}" >> "$GITHUB_OUTPUT" | |
| - name: Prepare deployment directory | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| env: | |
| DEPLOY_KEY: ${{ secrets.rsync_private_key }} | |
| DEPLOY_DEST: ${{ steps.deploy-path.outputs.dest }} | |
| run: | | |
| key_file="$RUNNER_TEMP/deploy_key" | |
| printf '%s\n' "$DEPLOY_KEY" > "$key_file" | |
| chmod 600 "$key_file" | |
| deploy_path="${DEPLOY_DEST#*:}" | |
| ssh -i "$key_file" -o StrictHostKeyChecking=no rsync-user@tiye.me "mkdir -p -- '$deploy_path'" | |
| - name: Deploy to server | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| id: deploy | |
| uses: Pendect/action-rsyncer@b7f90f4f8ed893d4e3f852f7a73180631f63d4bd # v2.0.0 | |
| env: | |
| DEPLOY_KEY: ${{secrets.rsync_private_key}} | |
| with: | |
| flags: '-avzr --progress' | |
| options: '' | |
| ssh_options: '' | |
| src: 'dist/*' | |
| dest: ${{ steps.deploy-path.outputs.dest }} | |
| - name: Display status from deploy | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| run: echo "${{ steps.deploy.outputs.status }}" |