Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14116

Only run CI tests when a tested file or directory changes

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Realm
    • None

    Description

      Description

      We should only run tests if there's some change to test. We gain nothing by running tests on PRs/pushes where no tested examples changed & doing so wastes time & resources.

      We can update our GitHub Actions workflows to do this. SeeĀ Example including paths in the GitHub docs.

      e.g. for .NET we could update /.github/workflows/dotnet-core.yml as in the following:

      (can we combine the `paths` definitions for `push` and `pull_request` somehow?)

      on:
        push:
          branches: [ master ]
          paths:
            - 'examples/dotnet/**'
        pull_request:
          branches: [ master ]
          paths:
            - 'examples/dotnet/**'

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Activity

          People

            nathan.contino@mongodb.com Nathan Contino (Inactive)
            nick.larew@mongodb.com Nicholas Larew
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3 years, 4 weeks, 2 days ago