mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
Refactor cron daily job to reuse pr workflow (#4062)
* Refactor cron daily job to reuse pr workflow * CR fix
This commit is contained in:
parent
d2ce87c7b0
commit
f4dd41bc0e
29
.github/workflows/daily-ci-cron.yml
vendored
29
.github/workflows/daily-ci-cron.yml
vendored
@ -1,29 +0,0 @@
|
|||||||
name: "Daily CI pipeline cron"
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 12 * * 1-5' #At 12:00 on every day-of-week from Monday through Friday.
|
|
||||||
|
|
||||||
env:
|
|
||||||
BASE_URL: ${{ secrets.PIPELINE_ENV_URL }}
|
|
||||||
ADMIN_EMAIL: ${{ secrets.PIPELINE_ADMIN_USERNAME }}
|
|
||||||
ADMIN_PASSWORD: ${{ secrets.PIPELINE_ADMIN_PASSWORD }}
|
|
||||||
HR_USER: ${{ secrets.HR_USER }}
|
|
||||||
HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
|
|
||||||
SCREENSHOT_USERNAME: ${{ secrets.SCREENSHOT_USERNAME }}
|
|
||||||
SCREENSHOT_PASSWORD: ${{ secrets.SCREENSHOT_PASSWORD}}
|
|
||||||
PLAYWRIGHT_E2E_HOST: ${{ secrets.PLAYWRIGHT_E2E_HOST }}
|
|
||||||
GH_BUILD_NUMBER: ${{ github.run_id }}
|
|
||||||
REPORT_PORTAL_URL: ${{ secrets.REPORT_PORTAL_URL }}
|
|
||||||
REPORT_PORTAL_TOKEN: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
MAXINSTANCES: 2
|
|
||||||
RETRY_COUNT: 2
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run-e2e:
|
|
||||||
name: Run e2e
|
|
||||||
uses: ./.github/workflows/pull-request.yml
|
|
||||||
with:
|
|
||||||
cron-run: 'true'
|
|
||||||
secrets: inherit
|
|
15
.github/workflows/pull-request.yml
vendored
15
.github/workflows/pull-request.yml
vendored
@ -4,13 +4,8 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
branches: [master, develop]
|
branches: [master, develop]
|
||||||
workflow_call:
|
schedule:
|
||||||
inputs:
|
- cron: '0 12 * * 1-5' #At 12:00 on every day-of-week from Monday through Friday.
|
||||||
cron-run:
|
|
||||||
description: 'Disables jobs which should not run during cron execution'
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: 'false'
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@ -33,7 +28,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
if: ${{ inputs.cron-run == 'false' || inputs.cron-run == '' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
name: 'lint'
|
name: 'lint'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -94,11 +89,11 @@ jobs:
|
|||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
if: ${{ inputs.cron-run == 'false' || inputs.cron-run == '' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
run: npm run affected:test -- --browsers=ChromeHeadless --watch=false $TEST_OPTS --base=origin/develop
|
run: npm run affected:test -- --browsers=ChromeHeadless --watch=false $TEST_OPTS --base=origin/develop
|
||||||
|
|
||||||
- name: Test all
|
- name: Test all
|
||||||
if: ${{ inputs.cron-run == 'true' }}
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
run: npx nx run-many --target=test --browsers=ChromeHeadless --watch=false $TEST_OPTS --base=origin/develop
|
run: npx nx run-many --target=test --browsers=ChromeHeadless --watch=false $TEST_OPTS --base=origin/develop
|
||||||
|
|
||||||
e2es-playwright:
|
e2es-playwright:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user