name: Run jest tests
on:
  pull_request: {}
  push:
    branches: [livekit, full-mesh]
jobs:
  jest:
    name: Run jest tests
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Yarn cache
        uses: actions/setup-node@v3
        with:
          cache: "yarn"
      - name: Install dependencies
        run: "yarn install"
      - name: Jest
        run: "yarn run test"
      - name: Upload to codecov
        uses: codecov/codecov-action@v3
        with:
          flags: unittests
