fix(client): Generate unique tunnel IDs for each protocol configurati… #82
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, master, develop] | |
| pull_request: | |
| branches: [main, master, develop] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_VERSION: "1.90.0" # Pin Rust version for reproducible builds | |
| jobs: | |
| build-webapps: | |
| name: Build Web Applications | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Build dashboard webapp | |
| run: | | |
| cd webapps/dashboard | |
| bun install | |
| bun run build | |
| - name: Build exit-node-portal webapp | |
| run: | | |
| cd webapps/exit-node-portal | |
| bun install | |
| bun run build | |
| - name: Upload webapp artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: webapps-ci | |
| path: | | |
| webapps/dashboard/dist | |
| webapps/exit-node-portal/dist | |
| retention-days: 1 | |
| build-nodejs-sdk: | |
| name: Build & Test Node.js SDK | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: sdks/nodejs | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run linting | |
| run: bun run lint | |
| - name: Run tests | |
| run: bun test | |
| - name: Build package | |
| run: bun run build:all | |
| - name: Verify package (dry run) | |
| run: npm pack --dry-run | |
| test: | |
| name: Test Suite | |
| needs: build-webapps | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download webapp artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: webapps-ci | |
| path: webapps/ | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "ci" | |
| cache-targets: true | |
| cache-on-failure: true | |
| - name: Build workspace (all crates) | |
| run: cargo build --workspace --verbose | |
| - name: Run tests | |
| run: cargo test --workspace --verbose | |
| lint: | |
| name: Linting | |
| needs: build-webapps | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download webapp artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: webapps-ci | |
| path: webapps/ | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| components: rustfmt, clippy | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "ci" | |
| cache-targets: true | |
| cache-on-failure: true | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| build: | |
| name: Build Check | |
| needs: build-webapps | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download webapp artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: webapps-ci | |
| path: webapps/ | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "ci" | |
| cache-targets: true | |
| cache-on-failure: true | |
| - name: Build workspace | |
| run: cargo build --release --workspace --verbose | |
| cli-e2e: | |
| name: CLI E2E Tests | |
| needs: [build, build-webapps] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download webapp artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: webapps-ci | |
| path: webapps/ | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "ci" | |
| cache-targets: true | |
| cache-on-failure: true | |
| - name: Build binaries in release mode | |
| run: cargo build --release --bins --workspace | |
| - name: Add binaries to PATH | |
| run: echo "${{ github.workspace }}/target/release" >> $GITHUB_PATH | |
| - name: Run CLI E2E tests | |
| run: bash .github/scripts/test-cli.sh | |
| - name: Upload test logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cli-test-logs | |
| path: /tmp/test_output.txt | |
| retention-days: 7 |