Skip to content

[BUG] Build workflows should use ni/python-actions #1239

Description

@bkeryan

Bug Report

This repo should be updated to use NI's standard GitHub Actions for Python projects: https://github.com/ni/python-actions

Benefits that would affect grpc-device:

  • Single-sources default versions for NI Python GitHub repos (currently Python 3.11.9, Poetry 2.1.4)
  • Caches Poetry installation
  • validate_examples.py could be replaced with ni/python-actions/analyze-project

Repro or Code Sample

https://github.com/ni/grpc-device/blob/main/.github/workflows/validate_python.yml

Expected Behavior

Uses ni/python-actions/setup-python and ni/python-actions/setup-poetry

Current Behavior

Uses actions/setup-python and abatilo/setup-poetry

Possible Solution

Update workflow.

To replace validate_examples.py with ni/python-actions/analyze-project, you would need to:

  • Add the lint tools (ni-python-styleguide, mypy, etc.) to a dev dependency group in the examples pyproject.toml so they work with poetry run
  • Change the workflow to run poetry run python -m grpc_tools.protoc ... directly
  • Change the workflow to call ni/python-actions/analyze-project with the project directory path
  • Inspect the logs and make sure it's running all of the intended tools

Context

Reviewing #1238

Your Environment

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions