diff --git a/.circleci/config.yml b/.circleci/config.yml index 617cdac42c28..e52af1f9d697 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -262,6 +262,60 @@ jobs: - report-workflow-on-failure - store_test_results: path: test-results + # We test a few sandboxes separately because + # they do not support Node 16 + node-18-sandboxes: + executor: + class: large + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1 --verbose' + - attach_workspace: + at: . + - run: + name: Start registry + command: | + yarn local-registry --open + background: true + working_directory: code + - run: + name: Wait for registry + command: | + yarn wait-on http://localhost:6001 + working_directory: code + - run: + name: Create Sandbox + command: | + yarn task --template angular-cli/prerelease --no-link --start-from=generate --junit --task sandbox + - run: + name: Build Sandbox + command: | + yarn task --template angular-cli/prerelease --no-link --start-from=sandbox --junit --task build + - run: + name: Chromatic + command: | + yarn task --template angular-cli/prerelease --no-link --start-from=build --junit --task chromatic + - run: + name: E2E Tests Production + command: | + yarn task --template angular-cli/prerelease --no-link --start-from=build --junit --task e2e-tests + - run: + name: E2E Tests Development + command: | + yarn task --template angular-cli/prerelease --no-link --start-from=build --junit --task e2e-tests-dev + - run: + name: Test Runner + command: | + yarn task --template angular-cli/prerelease --no-link --start-from=build --junit --task test-runner + - report-workflow-on-failure: + template: angular-cli/prerelease + - persist_to_workspace: + root: . + paths: + - sandbox + - store_test_results: + path: test-results ## new workflow create-sandboxes: parameters: @@ -608,33 +662,36 @@ workflows: - chromatic-internal-storybooks: requires: - build - - create-sandboxes: - parallelism: 34 + - node-18-sandboxes: requires: - build - # - smoke-test-sandboxes: # disabled for now + # - create-sandboxes: + # parallelism: 34 + # requires: + # - build + # # - smoke-test-sandboxes: # disabled for now + # # requires: + # # - create-sandboxes + # - build-sandboxes: + # parallelism: 34 # requires: # - create-sandboxes - - build-sandboxes: - parallelism: 34 - requires: - - create-sandboxes - - chromatic-sandboxes: - parallelism: 31 - requires: - - build-sandboxes - - e2e-production: - parallelism: 31 - requires: - - build-sandboxes - - e2e-dev: - parallelism: 4 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 31 - requires: - - build-sandboxes + # - chromatic-sandboxes: + # parallelism: 31 + # requires: + # - build-sandboxes + # - e2e-production: + # parallelism: 31 + # requires: + # - build-sandboxes + # - e2e-dev: + # parallelism: 4 + # requires: + # - create-sandboxes + # - test-runner-production: + # parallelism: 31 + # requires: + # - build-sandboxes # TODO: reenable once we find out the source of flakyness # - test-runner-dev: # parallelism: 4 diff --git a/.github/workflows/generate-sandboxes-main.yml b/.github/workflows/generate-sandboxes-main.yml index 474542495848..5b2dad606f64 100644 --- a/.github/workflows/generate-sandboxes-main.yml +++ b/.github/workflows/generate-sandboxes-main.yml @@ -24,6 +24,7 @@ jobs: node-version: 16 - uses: actions/checkout@v3 with: + # 👉 DON'T FORGET TO UNDO THE VALUE BACK TO `main` BEFORE YOU MERGE YOUR CHANGES! ref: main - name: Setup git user run: | @@ -42,9 +43,15 @@ jobs: - name: Wait for registry run: yarn wait-on http://localhost:6001 working-directory: ./code - - name: Generate + - name: Generate Node 16 sandboxes run: yarn generate-sandboxes --local-registry --exclude=angular-cli/prerelease working-directory: ./code + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Generate Node 18 sandboxes + run: yarn generate-sandboxes --local-registry --templates=angular-cli/prerelease + working-directory: ./code - name: Publish run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push --branch=main working-directory: ./code diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index f6ab2f7c822f..43c2c02195dd 100644 --- a/.github/workflows/generate-sandboxes-next.yml +++ b/.github/workflows/generate-sandboxes-next.yml @@ -24,6 +24,7 @@ jobs: node-version: 16 - uses: actions/checkout@v3 with: + # 👉 DON'T FORGET TO UNDO THE VALUE BACK TO `next` BEFORE YOU MERGE YOUR CHANGES! ref: next - name: Setup git user run: | @@ -42,9 +43,15 @@ jobs: - name: Wait for registry run: yarn wait-on http://localhost:6001 working-directory: ./code - - name: Generate + - name: Generate Node 16 sandboxes run: yarn generate-sandboxes --local-registry --exclude=angular-cli/prerelease working-directory: ./code + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Generate Node 18 sandboxes + run: yarn generate-sandboxes --local-registry --templates=angular-cli/prerelease + working-directory: ./code - name: Publish run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push --branch=next working-directory: ./code diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 69e858f1d14f..f9c1bf5085a6 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -289,7 +289,7 @@ const baseTemplates = { 'angular-cli/prerelease': { name: 'Angular CLI Prerelease (Webpack | TypeScript)', script: - 'npx -p @angular/cli@next ng new angular-v16 --directory {{beforeDir}} --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn', + 'npx -p @angular/cli@next ng new angular-v17 --directory {{beforeDir}} --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn', expected: { framework: '@storybook/angular', renderer: '@storybook/angular',