Skip to content

Commit

Permalink
Merge pull request #18 from chingu-x/GH-actions-tests
Browse files Browse the repository at this point in the history
Update workflow to run cypress only on PRs to Main
  • Loading branch information
marktlinn authored Sep 9, 2023
2 parents 577829f + e6e9942 commit 88b6166
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

yarn prettier
yarn lint
yarn cypress

0 comments on commit 88b6166

Please sign in to comment.