fix(ui): refresh swr caches properly #759
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: ci | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_PROFILE_TEST_DEBUG: 0 | |
| CARGO_NET_RETRY: 10 | |
| RUST_BACKTRACE: short | |
| RUSTUP_MAX_RETRIES: 10 | |
| jobs: | |
| js: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '23.5.0' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.2 | |
| - name: Install Dependencies | |
| run: bun install --frozen-lockfile | |
| # don't bother building the js side - tauri will do that | |
| - name: Type Check | |
| run: bun typecheck | |
| - name: Format Check | |
| run: bun format | |
| - name: Lint Check | |
| run: bun lint | |
| rust: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Update Rust Toolchain | |
| uses: dtolnay/rust-toolchain@1.88.0 | |
| with: | |
| components: rustfmt, clippy | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build | |
| run: cargo build --locked # this might download deps, should be cached | |
| - name: Lint (Clippy) | |
| run: cargo clippy --frozen -- -D warnings | |
| - name: Test | |
| run: cargo test --locked # this also downloads deps, but not cached... | |
| - name: Lint (Format) | |
| run: cargo fmt --all -- --check | |
| tauri: | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Update Rust Toolchain | |
| uses: dtolnay/rust-toolchain@1.88.0 | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '23.5.0' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.2 | |
| - name: Install Dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build Tauri App only | |
| if: github.ref != 'refs/heads/main' | |
| uses: tauri-apps/tauri-action@v0 | |
| with: | |
| args: -- --locked | |
| tauriScript: bun tauri | |
| - name: Upload PR Build Artifacts | |
| if: github.ref != 'refs/heads/main' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Cobalt-${{ github.run_number }} | |
| path: target/release/bundle/msi/*.msi | |
| if-no-files-found: error | |
| - name: Build Tauri App (nightly) | |
| if: github.ref == 'refs/heads/main' | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| args: -- --locked | |
| includeUpdaterJson: true | |
| tauriScript: bun tauri | |
| tagName: nightly | |
| - name: Update tag (nightly) | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.git.updateRef({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| ref: 'tags/nightly', | |
| sha: context.sha | |
| }) | |
| integration: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| group: [1, 2, 3, 4] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Update Rust Toolchain | |
| uses: dtolnay/rust-toolchain@1.88.0 | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: integration | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Set up Python | |
| run: uv python install | |
| - name: Ruff Format | |
| if: matrix.group == 1 | |
| run: uv run ruff format --check | |
| - name: Ruff Check | |
| if: matrix.group == 1 | |
| run: uv run ruff check --output-format=github | |
| - name: Run tests (group ${{ matrix.group }}/4) | |
| run: uv run --exact --package integration-py pytest -o log_cli_level=INFO -v --splits 4 --group ${{ matrix.group }} |