fix(botjs): move TypeScript from peerDependencies to devDependencies #183
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, dev] | |
| pull_request: | |
| branches: [main, dev] | |
| jobs: | |
| lint-and-test: | |
| name: Lint & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 8 | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| pkg-config \ | |
| libglib2.0-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| libwayland-dev \ | |
| libxcb1-dev \ | |
| libxrandr-dev \ | |
| libdbus-1-dev \ | |
| libpipewire-0.3-dev \ | |
| libegl1-mesa-dev \ | |
| libgles2-mesa-dev \ | |
| libgbm-dev \ | |
| libasound2-dev \ | |
| xvfb \ | |
| libxi-dev \ | |
| libxtst-dev \ | |
| libxdo-dev \ | |
| libwayland-dev | |
| - name: Install dependencies | |
| run: pnpm install -r | |
| - name: Build | |
| run: pnpm build | |
| - name: Test TypeScript | |
| run: pnpm test | |
| working-directory: packages/botjs | |
| env: | |
| # Integration tests require system interaction (mouse, keyboard, screen) | |
| # They are disabled by default in CI because: | |
| # - GitHub Actions runners are typically headless | |
| # - May require special permissions or setup | |
| # - Can be flaky in virtualized environments | |
| # | |
| # To enable integration tests in CI: | |
| # 1. Uncomment the line below | |
| # 2. Ensure proper display server setup (Xvfb for Linux) | |
| # 3. Consider using self-hosted runners for better reliability | |
| ENABLE_INTEGRATION_TESTS: "false" | |
| rust-test: | |
| name: Rust Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| pkg-config \ | |
| libglib2.0-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| libwayland-dev \ | |
| libxcb1-dev \ | |
| libxrandr-dev \ | |
| libdbus-1-dev \ | |
| libpipewire-0.3-dev \ | |
| libegl1-mesa-dev \ | |
| libgles2-mesa-dev \ | |
| libgbm-dev \ | |
| libasound2-dev \ | |
| libxi-dev \ | |
| libxtst-dev \ | |
| libxdo-dev | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| packages/bot/target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Run Rust tests | |
| run: cargo test --verbose | |
| working-directory: packages/bot | |
| - name: Check Rust formatting | |
| run: cargo fmt -- --check | |
| working-directory: packages/bot | |
| - name: Run Clippy | |
| run: cargo clippy -- -D warnings | |
| working-directory: packages/bot |