Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(testing): add lerna-smoke-tests #14347

Merged
merged 6 commits into from
Jan 17, 2023

Conversation

JamesHenry
Copy link
Collaborator

Current Behavior

Nx devs are not prevented from making changes which break key assumptions in lerna, such as for lerna repair or lerna run.

Expected Behavior

Lightweight lerna smoke tests catch any critical issues in CI and prevent them from being released

@vercel
Copy link

vercel bot commented Jan 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
nx-dev ⬜️ Ignored (Inspect) Jan 17, 2023 at 7:23PM (UTC)

@nx-cloud
Copy link

nx-cloud bot commented Jan 13, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 4ecf9f6. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@@ -95,6 +95,9 @@
{
"env": "SELECTED_CLI"
},
{
"env": "SELECTED_PM"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I discovered this was missing from the cache key when switching package managers locally to test this

@JamesHenry JamesHenry marked this pull request as ready for review January 13, 2023 18:11
@JamesHenry JamesHenry requested a review from vsavkin January 13, 2023 18:11
@vsavkin
Copy link
Member

vsavkin commented Jan 17, 2023

You need to exclude lerna tests here:

  mainmacos:
    executor: macos
    environment:
      NX_E2E_CI_CACHE_KEY: e2e-circleci-macos
      NX_DAEMON: 'true'
    steps:
      - run:
          name: Set dynamic nx run variable
          command: |
            echo "export NX_RUN_GROUP=\"run-group-macos-$CIRCLE_WORKFLOW_ID\";" >> $BASH_ENV
      - setup:
          os: macos
      - nx/set-shas:
          main-branch-name: 'master'
      - run:
          name: Check if "detox" or "react-native" were modified directly
          command: |
            COUNT=`git diff --name-only $NX_BASE $NX_HEAD | (grep -E 'packages/detox|packages/react-native|e2e/detox|e2e/react-native' || true) | wc -l`
            if [[ $COUNT -gt 0 ]]; then
              echo "React Native and Detox were touched directly"
              echo "export E2E_AFFECTED=true;" >> $BASH_ENV
            else
              echo "React Native and Detox were not touched directly"
              echo "export E2E_AFFECTED=false;" >> $BASH_ENV
            fi
      - run:
          name: Run E2E Tests
          command: |
            if $E2E_AFFECTED; then
              npx nx affected --target=e2e --base=$NX_BASE --head=$NX_HEAD --exclude=e2e-make-angular-cli-faster,e2e-detox,e2e-js,e2e-next,e2e-workspace-create,e2e-nx-run,e2e-nx-misc,e2e-react,e2e-web,e2e-webpack,e2e-rollup,e2e-esbuild,e2e-angular-extensions,e2e-angular-core,e2e-nx-plugin,e2e-cypress,e2e-node,e2e-linter,e2e-jest,e2e-add-nx-to-monorepo,nx-dev-e2e,e2e-nx-init,e2e-graph-client,e2e-vite,e2e-cra-to-nx,e2e-storybook,e2e-storybook-angular --parallel=1;
            else
              echo "Skipping E2E tests";
            fi
          no_output_timeout: 45m

@JamesHenry
Copy link
Collaborator Author

Per slack discussion with Victor I refactored the CI config to use a dedicated e2e-macos target

@JamesHenry JamesHenry merged commit 965c638 into nrwl:master Jan 17, 2023
@JamesHenry JamesHenry deleted the lerna-smoke-tests branch January 17, 2023 19:50
FrozenPandaz pushed a commit that referenced this pull request Jan 17, 2023
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants