Refactor cron daily job to reuse pr workflow (#4062)

* Refactor cron daily job to reuse pr workflow

* CR  fix
This commit is contained in:
MichalKinas
2024-08-28 10:43:52 +02:00
committed by GitHub
parent d2ce87c7b0
commit f4dd41bc0e
2 changed files with 5 additions and 39 deletions
+5 -10
View File
@@ -4,13 +4,8 @@ on:
pull_request:
types: [opened, synchronize, reopened]
branches: [master, develop]
workflow_call:
inputs:
cron-run:
description: 'Disables jobs which should not run during cron execution'
required: false
type: string
default: 'false'
schedule:
- cron: '0 12 * * 1-5' #At 12:00 on every day-of-week from Monday through Friday.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -33,7 +28,7 @@ env:
jobs:
lint:
if: ${{ inputs.cron-run == 'false' || inputs.cron-run == '' }}
if: ${{ github.event_name == 'pull_request' }}
name: 'lint'
runs-on: ubuntu-latest
steps:
@@ -94,11 +89,11 @@ jobs:
- run: npm ci
- 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
- 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
e2es-playwright: