l

    lively-author-18255

    8 months ago
    Hi, I am trying to use pulumi/actions but it complains about
    ModuleNotFoundError: No module named 'pulumi'
    I am trying to use pipenv and I see it should be supported. What is the proper way to set up pipenv? Any examples? Thanks!
    g

    great-queen-39697

    8 months ago
    Do you have pipenv set up with your project already? If I remember correctly, it's looking for a Pipfile.lock file in the repo. If that file is present, it auto-runs the action with pipenv
    l

    lively-author-18255

    8 months ago
    yes, I have. I can see in the logs:
    Successfully created virtual environment!
    Installing dependencies from Pipfile.lock
    I set up python:
    - name: Setup Python
            uses: actions/setup-python@v2
            with:
              python-version: 3.9.9
              architecture: 'x64'
    and pipenv, pulumi
    - name: Install Pulumi prereqs
            run: |
              pip install --upgrade pip
              pip install --upgrade pipenv
              pipenv install
    
          - name: Install pulumi
            uses: pulumi/setup-pulumi@v2
    but for some reason I still get
    ModuleNotFoundError: No module named 'pulumi'
    g

    great-queen-39697

    7 months ago
    Ah, which version of the action are you working with? As of v3, you shouldn't need to install the Pulumi package, so it matters for finding examples. Can you drop your actions file thus far so I can help figure out what's up?
    l

    lively-author-18255

    7 months ago
    I am trying to use version 3.
    name: Pulumi Preview
    on:
      pull_request:
        paths-ignore:
          - 'path1'
          - 'path2'
    jobs:
      preview:
        runs-on: ubuntu-latest
        name: Pulumi preview
        steps:
          - uses: actions/checkout@v2
          - name: Setup Python
            uses: actions/setup-python@v2
            with:
              python-version: 3.9.9
          - name: Install pipenv
            run: |
              pip install --upgrade pip
              pip install --upgrade pipenv
              pipenv install
    
          - uses: pulumi/actions@v3
            with:
              command: preview
              stack-name: mystack/dev
              work-dir: ./mydir
              comment-on-pr: true
    Thanks!
    g

    great-queen-39697

    7 months ago
    Gotcha; give me a bit to try to replicate it as I'm not seeing anything majorly different from the examples and stuff I've done...
    l

    lively-author-18255

    7 months ago
    Hi 🙂 Any updates?