mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-25 08:50:18 +00:00
chore(ci): Update CRON for Cypress CI (#14686)
* chore(ci): Update CRON for Cypress CI * chore(ci): Run MySQL only with Schedule or dispatch. * chore(ci): Add Pull Request Target Path * Update .github/workflows/cypress-integration-tests-postgresql.yml Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> --------- Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com>
This commit is contained in:
parent
dcbd6a842a
commit
62c09ff15b
@ -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
|
||||
@ -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
|
||||
@ -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:
|
||||
@ -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
|
||||
|
@ -17,7 +17,7 @@ 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
|
||||
@ -25,6 +25,12 @@ on:
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
paths:
|
||||
- openmetadata-spec/**
|
||||
- openmetadata-ui/**
|
||||
- openmetadata-service/**
|
||||
- openmetadata-clients/**
|
||||
- common/**
|
||||
paths-ignore:
|
||||
- 'openmetadata-docs/**'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user