feat: add export for proposals / multisig #139
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: Sagat CI | |
| on: | |
| pull_request: | |
| branches: [main, master] | |
| push: | |
| branches: [main, master] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| lint-and-format: | |
| name: Lint & Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Check formatting | |
| run: bun fmt:check | |
| - name: Lint app | |
| run: bun lint | |
| typecheck: | |
| name: TypeScript Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build SDK | |
| run: bun run build | |
| working-directory: sdk | |
| - name: Typecheck SDK | |
| run: bun typecheck | |
| - name: Build App (typecheck) | |
| run: bun run build | |
| working-directory: app | |
| build: | |
| name: Build Monorepo | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build workspace | |
| run: bun run build | |
| frontend-test: | |
| name: Frontend Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run app Vitest suite | |
| run: bun run test | |
| working-directory: app | |
| test: | |
| name: API E2E Tests | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_USER: sagat | |
| POSTGRES_PASSWORD: sagat | |
| POSTGRES_DB: sagat_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build SDK | |
| run: bun run build | |
| working-directory: sdk | |
| - name: Install suiup | |
| run: | | |
| curl -sSfL https://raw.githubusercontent.com/Mystenlabs/suiup/main/install.sh | sh | |
| - name: Add Sui to PATH | |
| run: | | |
| echo "$HOME/.sui/bin" >> $GITHUB_PATH | |
| - name: Install Sui binaries | |
| run: | | |
| export PATH="$HOME/.sui/bin:$PATH" | |
| suiup install sui@mainnet -y | |
| sui --version | |
| - name: Start Sui local network | |
| env: | |
| RUST_LOG: off | |
| run: | | |
| export PATH="$HOME/.sui/bin:$PATH" | |
| sui start --force-regenesis --with-faucet & | |
| # Wait for network to be ready | |
| echo "Waiting for Sui network to start..." | |
| timeout 90 bash -c 'until curl -sf -X POST http://127.0.0.1:9000 -H "Content-Type: application/json" -d '\''{"jsonrpc":"2.0","id":1,"method":"sui_getChainIdentifier","params":[]}'\'' 2>/dev/null | grep -q result; do echo "Waiting..."; sleep 2; done' | |
| echo "Sui network is ready!" | |
| curl -X POST http://127.0.0.1:9000 \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"jsonrpc":"2.0","id":1,"method":"sui_getChainIdentifier","params":[]}' | |
| - name: Run API E2E tests | |
| run: bun test:e2e | |
| working-directory: api | |
| env: | |
| TEST_DATABASE_URL: postgresql://sagat:sagat@localhost:5432/sagat_test | |
| JWT_SECRET: a-super-long-jwt-secret-to-use-in-the-service | |
| SUPPORTED_NETWORKS: localnet | |
| CORS_ALLOWED_ORIGINS: http://localhost:3000,http://localhost:5173 |