[AAE-1274] CI opt - Build only core/content/process storybook (#8139)

* Build only core/content/process storybook

* Use a target and run only if affected

* Do not run any storybook e2e
This commit is contained in:
Maurizio Vitale 2023-01-12 16:18:38 +00:00 committed by GitHub
parent 34e5508076
commit f654fdf008
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 6 deletions

View File

@ -70,7 +70,7 @@ env:
jobs:
setup:
# long timeout required when cache has to be recreated
# long timeout required when cache has to be recreated
timeout-minutes: 30
name: "Setup"
runs-on: ubuntu-22.04
@ -105,14 +105,14 @@ jobs:
- name: insights
exclude: "core,extensions,content-services,process-services-cloud"
- name: process-cloud
exclude: "insights,core,extensions,content-services,process-services"
exclude: "insights,core,extensions,content-services,process-services"
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
- uses: ./.github/actions/download-cache-and-artifacts
- uses: ./.github/actions/download-cache-and-artifacts
- name: Run unit tests
run: |
/usr/bin/xvfb-run --auto-servernum nx affected:test $NX_CALCULATION_FLAGS --exclude=${{ matrix.unit-tests.exclude }}
@ -147,7 +147,7 @@ jobs:
- uses: ./.github/actions/download-cache-and-artifacts
- run: nx affected:build $NX_CALCULATION_FLAGS --prod
- run: nx build demoshell --configuration production
- run: nx run stories:build-storybook --configuration ci
- run: nx affected --target=build-storybook $NX_CALCULATION_FLAGS --configuration ci
- uses: ./.github/actions/upload-cache-and-artifacts
e2e-storybook:
@ -166,7 +166,7 @@ jobs:
run: |
npx playwright install chromium
sudo sysctl -w fs.inotify.max_user_watches=524288
npx playwright test --config='e2e-playwright/playwright.config.ts' || exit 1
npx nx affected --target=e2e-playwright $NX_CALCULATION_FLAGS || exit 1
- uses: ./.github/actions/upload-cache-and-artifacts
e2e:
@ -315,4 +315,4 @@ jobs:
check-ps-cloud-env: ${{ matrix.e2e-test.check-ps-cloud-env }}
check-external-cs-env: ${{ matrix.e2e-test.check-external-cs-env }}
apa-proxy: ${{ matrix.e2e-test.apa-proxy }}
#
#

View File

@ -678,6 +678,17 @@
}
}
},
"e2e-playwright": {
"executor": "nx:run-commands",
"options": {
"commands": [
{
"command": "$(npm bin)/playwright test --config='e2e-playwright/playwright.config.ts'"
}
]
}
},
"spellcheck": {
"executor": "nx:run-commands",
"options": {