name: ClientAPI Check

on:
  push:
    branches: [ main ]
  pull_request:
    types: [ opened, synchronize, reopened ]
    branches: [ main ]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
        with:
          workspaces: |
            AppFlowy-Cloud

      - name: Check
        working-directory: ./libs/client-api
        run: cargo build

