Skip to content

Latest commit

 

History

History
77 lines (50 loc) · 2 KB

LAB.md

File metadata and controls

77 lines (50 loc) · 2 KB

🔍 Lab 17 - NxCloud GitHub bot

⏰  Estimated time: 10 minutes

📚 Learning outcomes:

  • Explore the NxCloud Run-Detail pages
  • Configure the NxCloud bot to get easy to read reports on the Nx checks performed during CI

🏋️‍♀️ Steps :

  1. Enable the NxCloud GitHub bot on your GitHub repository: https://github.com/apps/nx-cloud

  1. Switch to a new branch: git checkout -b nxcloud-bot

  1. Add these env variables to your GitHub actions config:

    name: Run CI checks
    
    on: [pull_request]
    
    env:
      NX_BRANCH: ${{ github.event.number }}
      NX_RUN_GROUP: ${{ github.run_id }}
    
    jobs:
      build:
        ......
    

  1. Make a change (add a console.log("...") somewhere in apps/store/src/app/app.tsx) in the store app (so that it will trigger our affected commands in CI).

    ⚠️  If you already added the ci.yml as an implicit dependency of *, this step is optional


  1. Commit everything and push your branch

  1. Make a PR on GitHub

  1. Once the checks finish you should see something similar to this:

    NxCloud Bot


  1. Click on one of the "failed" commands (if any). On the "Run Details" page, click on one of the projects and inspect the terminal output:

    Nx Cloud project

    🔥 Rather than reading through CI logs, you can use this view to filter to the failed projects and inspect the failure reason scoped to that project.


  1. Have a look at the "Cache Hit" and "Cache Miss" filters. What do you think they do?

    Cache hit/miss


  1. Finally, you should see a "Claim workspace" button at the top - it's a good idea to do that at this stage. We'll explain more about that in a bit!

  1. Merge your PR into master and pull latest locally:

    git checkout master
    git pull
    


➡️  Next lab ➡️