Skip to content

Conversation

@bkeryan
Copy link
Collaborator

@bkeryan bkeryan commented Sep 23, 2025

What does this Pull Request accomplish?

Use poetry env activate before querying the path.

Why should this Pull Request be merged?

Make venv caching work

What testing has been done?

Manually ran workflow.

@bkeryan bkeryan requested a review from mshafer-NI as a code owner September 23, 2025 21:43
@dixonjoel dixonjoel merged commit 96c1e97 into users/jdixon/add-common-workflows Sep 24, 2025
@dixonjoel dixonjoel deleted the users/bkeryan/add-common-workflows branch September 24, 2025 13:55
dixonjoel added a commit that referenced this pull request Sep 24, 2025
* Add check_analyzers as a trial balloon

* Fix project-directory inputs, change name of .yml file. Update install-drivers to install-extras

* Rename to analyze-project.yml and 'extras'

* Remove bandit checks. Will be covered by ni-python-styleguide soon

* Switch to a composite action

* Add test for analyze-project

* Create project to analyze

* Add shell specification for actions

* Attempt to fix the project directory for analyze test

* Attempt to fix the project directory for analyze test

* Produce poetry.lock before analyzing

* Add dependency on ni-python-styleguide

* Use a compatible Python version

* Use matrix Python version

* Another attempt at the correct python version

* Tenth time is the charm

* Eleventh time is the charm

* Twelfth time is the charm

* Thirteenth time is the charm

* Try try again

* Try try again

* Add docstrings to .py files

* Try try again

* Whee! Let's try Python

* Add mypy dependency

* Further restrict the Python version for mypy to work

* Show pyproject.toml after the addition of deps

* Attempt to use a template project for testing

* Add mypy section

* Add pyright dependencies

* Update poetry .lock

* Try different working directory

* Try original working directory

* Attempt to make it work on Windows

* Test more Python versions

* Make mypy and pyright optional.

* fix yml syntax

* Indent python code

* Check the outputs

* Check packages after install

* Use GITHUB_OUTPUT

* Move minimal test project under .github to hide it

* Simplify Add virtualenv to the path for pyright-action

* Various PR feedback

* Use poetry env info --path to get the venv path

* Add -C parameter to poetry env --info command

* Attempt to use {{ github.workspace }} instead of ./

* Attempt to use working-directory instead of -C <path>

* Remove stray quote

* Try quoting

* Remove some bash code to narrow down error

* Add back in path

* Try another arrangement

* Try without echoing the path

* Try some quotes, why not?

* Try without --path, why not

* Try without Python 3.9

* Echo the poetry env info

* Add back in path

* Try a different arrangement of quotes

* Change variable name

* Change variable name

* print some debug info

* don't stop on help

* don't fail fast

* ok, let's print it out without exiting first

* ok, use or

* ok, try this...

* analyze-project: Fix venv caching (#28)

* analyze-project: Fix venv caching

* analyze-project: Update prints

---------

Co-authored-by: Joel Dixon <38357562+dixonjoel@users.noreply.github.com>

* Restore all the matrix of python versions and OSs

* Fix copy and paste error in test_actions.yml

* Minor PR feedback

* Remove 3.13t Python from some spots

* Use v0 for actions in README

---------

Co-authored-by: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com>
Co-authored-by: Brad Keryan <brad.keryan@ni.com>
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.

3 participants