Skip to content

Conversation

@dixonjoel
Copy link
Collaborator

@dixonjoel dixonjoel commented Sep 28, 2025

What does this Pull Request accomplish?

Fixes #31

Add test scenarios with test projects for

  • project w/passing nps, mypy, pyright (minimal)
  • project with nps errors (ni-python-styleguide-errors)
  • project with mypy errors (mypy-errors)
  • project with pyright errors (pyright-errors)
  • project with only nps (only-ni-python-styleguide)

Why should this Pull Request be merged?

Expands test coverage for analyze-project

What testing has been done?

Running this PR is exercising the new tests.

@dixonjoel dixonjoel changed the title Add test project for ni-python-styleguide errors Add test scenarios for analyze-project Sep 28, 2025
@dixonjoel dixonjoel marked this pull request as ready for review September 28, 2025 19:19
@dixonjoel
Copy link
Collaborator Author

@bkeryan Can you expand on what you expect for 'run again with cached venv'? Would this involve adding a 'use-cache' input to analyze-project to determine if it caches the venv?

@bkeryan
Copy link
Collaborator

bkeryan commented Sep 29, 2025

@bkeryan Can you expand on what you expect for 'run again with cached venv'? Would this involve adding a 'use-cache' input to analyze-project to determine if it caches the venv?

Run another job that uses the same venv. Use needs to ensure that it runs after the first job.

Example: https://github.com/ni/python-actions/blob/main/.github/workflows/test_actions.yml#L68

  test_setup_poetry_cache_hit:
    name: Test setup-poetry (cache hit)
    runs-on: ${{ matrix.os }}
    needs: test_setup_poetry

test_setup_poetry_cache_hit also does extra validation that I'm not expecting here. We should probably do that validation when we extract a cache_venv action.

@dixonjoel dixonjoel merged commit f42e2f2 into main Sep 29, 2025
153 checks passed
@dixonjoel dixonjoel deleted the users/jdixon/analyze-project-tests branch September 29, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ni/python-actions/analyze-project does not think mypy is installed

3 participants