Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Update CRON for Cypress CI #14686

Merged
merged 4 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 3 additions & 42 deletions .github/workflows/cypress-integration-tests-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,7 @@ name: MySQL Cypress Integration Tests
on:
workflow_dispatch:
schedule:
- cron: '30 2 * * 1-5'
pull_request_target:
types:
- labeled
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- 'openmetadata-docs/**'
- cron: '30 2 * * 2,4'

permissions:
contents: read
Expand All @@ -37,12 +28,7 @@ concurrency:

jobs:
cypress-ci-mysql:
if: |
github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|| ( github.event_name == 'pull_request_target'
&& contains(github.event.pull_request.labels.*.name, 'e2e')
&& github.event.pull_request.draft == false
)
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -52,15 +38,9 @@ jobs:
steps:
- name: Set Project ID Environment variable
id: cypress-project-id
run: |
if [ "${{ github.event_name }}" == "schedule" ]; then
run: |
echo "PROJECT_ID=${{ secrets.CYPRESS_SCHEDULE_PROJECT_ID }}" >> $GITHUB_OUTPUT
echo "CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_SCHEDULE_RECORD_KEY }}" >> $GITHUB_OUTPUT
else
echo "PROJECT_ID=${{ secrets.CYPRESS_PR_PROJECT_ID }}" >> $GITHUB_OUTPUT
echo "CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_PR_RECORD_KEY }}" >> $GITHUB_OUTPUT
fi

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
Expand All @@ -71,28 +51,9 @@ jobs:
large-packages: false
swap-storage: true
docker-images: false
- name: Wait for the labeler
uses: lewagon/wait-on-check-action@v1.3.3
if: ${{ github.event_name == 'pull_request_target' }}
with:
ref: ${{ github.event.pull_request.head.sha }}
check-name: Team Label
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 90

- name: Verify PR labels
uses: jesusvasquez333/verify-pr-label-action@v1.4.0
if: ${{ github.event_name == 'pull_request_target' }}
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
valid-labels: 'safe to test'
pull-request-number: '${{ github.event.pull_request.number }}'
disable-reviews: true # To not auto approve changes

- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Cache Maven Dependencies
id: cache-output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ name: PostgreSQL Cypress Integration Tests
on:
workflow_dispatch:
schedule:
- cron: '30 2 * * 1-5'
- cron: '30 2 * * 1,3,5'
pull_request_target:
types:
- labeled
- opened
- synchronize
- reopened
- ready_for_review
paths:
- openmetadata-spec/**
- openmetadata-ui/**
- openmetadata-service/**
akash-jain-10 marked this conversation as resolved.
Show resolved Hide resolved
paths-ignore:
- 'openmetadata-docs/**'

Expand Down
Loading