Skip to content

Commit

Permalink
Update cypress.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bddwithTim authored Oct 22, 2024
1 parent 9798931 commit 7685be5
Showing 1 changed file with 32 additions and 24 deletions.
56 changes: 32 additions & 24 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,40 @@ on:
branches: [ main ]
workflow_dispatch: # For manual triggering
schedule:
- cron: '0 19 * * *' # Runs every day at 19:00 UTC (which is 3 AM GMT+8)
- cron: '0 19 * * *' # Runs every day at 3 AM GMT+8 (19:00 UTC)

jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm ci

- name: Run Cypress tests
uses: cypress-io/github-action@v5
with:
browser: chrome
headless: true

- name: Upload test results
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-results
path: cypress/results
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm ci

- name: Run Cypress tests
uses: cypress-io/github-action@v5
with:
browser: chrome
headed: false # Replaced headless with the correct option

- name: Upload test results
uses: actions/upload-artifact@v3
if: failure() # Upload results only if there's a failure
with:
name: cypress-results
path: cypress/results

- name: Post Setup Node.js
if: always()
run: echo "Cleaning up after tests"

- name: Post Checkout
if: always()
run: echo "Final cleanup"

0 comments on commit 7685be5

Please sign in to comment.