diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cba9c810..446ecd62 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: "18" # current LTS (we have 16 in Docker) + node-version: "18" - name: Install dependencies run: yarn install @@ -27,4 +27,9 @@ jobs: run: yarn test - name: Run Cypress tests - run: yarn cypress + run: | + if [[ ${{ github.event.pull_request.base.ref }} == 'main' ]]; then + yarn cypress + else + echo "Skipping Cypress tests for non-main branch." + fi diff --git a/.husky/pre-push b/.husky/pre-push index 07c67d33..c2162796 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -3,3 +3,4 @@ yarn prettier yarn lint +yarn cypress