Skip to content

Commit

Permalink
[ACS-8660] Introduce daily CI cron workflow (#4055)
Browse files Browse the repository at this point in the history
* [ACS-8660] Introduce daily CI cron workflow

* [ACS-8660] Rename workflow file

* [ACS-8660] Small fix

* [ACS-8660] Refine cron workflow param

* [ACS-8660] GHA input visibility fix

* [ACS-8660] GHA input fix
  • Loading branch information
MichalKinas authored Aug 27, 2024
1 parent 1bd16a1 commit ca3636a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/daily-ci-cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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
17 changes: 16 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ 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'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -26,6 +33,7 @@ env:

jobs:
lint:
if: ${{ inputs.cron-run == 'false' || inputs.cron-run == '' }}
name: 'lint'
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -84,7 +92,14 @@ jobs:
cache: 'npm'
- uses: ./.github/actions/before-install
- run: npm ci
- run: npm run affected:test -- --browsers=ChromeHeadless --watch=false $TEST_OPTS --base=origin/develop

- name: Test
if: ${{ inputs.cron-run == 'false' || inputs.cron-run == '' }}
run: npm run affected:test -- --browsers=ChromeHeadless --watch=false $TEST_OPTS --base=origin/develop

- name: Test all
if: ${{ inputs.cron-run == 'true' }}
run: npx nx run-many --target=test --browsers=ChromeHeadless --watch=false $TEST_OPTS --base=origin/develop

e2es-playwright:
needs: [lint, build, unit-tests]
Expand Down

0 comments on commit ca3636a

Please sign in to comment.