Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors using molecule-action v5 #15

Open
abh opened this issue Jun 2, 2023 · 6 comments
Open

errors using molecule-action v5 #15

abh opened this issue Jun 2, 2023 · 6 comments

Comments

@abh
Copy link

abh commented Jun 2, 2023

(I'm new to making ansible roles AND GitHub actions, so bear with me!)

In my ansible-timezone fork I'm trying to use molecule-action to test. With v5 it fails running molecule missing a parameter, it seems.

In my last test I setup the job so it runs lint with v4 (works) and test with v5 (fails).

Usage: molecule [OPTIONS] COMMAND [ARGS]...
Try 'molecule --help' for help.

Error: No such option: --debug test (Possible options: --debug, --no-debug)
ACTION: Retry attempt 1.
Usage: molecule [OPTIONS] COMMAND [ARGS]...
Try 'molecule --help' for help.

Example action run: https://github.com/abh/ansible-timezone/actions/runs/5152456387/jobs/9278594310

workflow file

Also pasted here:

---
name: GitHub Action

on:
  push:
    branches:
      - main
    tags:
      - "v[0-9]+.[0-9]+.[0-9]+"

jobs:
  lint:
    runs-on: ubuntu-22.04
    steps:
      - name: checkout
        uses: actions/checkout@v3
        with:
          path: "${{ github.repository }}"
      - name: molecule
        # https://github.com/marketplace/actions/test-ansible-roles-with-molecule
        uses: robertdebock/[email protected]
        with:
          command: lint

  test:
    needs:
      - lint 
    runs-on: ubuntu-20.04
    steps:
      - name: checkout
        uses: actions/checkout@v3
        with:
          path: "${{ github.repository }}"
      - name: molecule
        uses: robertdebock/[email protected]
        with:
          command: "--debug test"

  release:
    needs:
      - test
    runs-on: ubuntu-latest
    if: startsWith(github.event.ref, 'refs/tags/v')
    steps:
      - name: checkout
        uses: actions/checkout@v3
      - name: galaxy
        # https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
        uses: robertdebock/[email protected]
        with:
          galaxy_api_key: ${{ secrets.galaxy_api_key }}
          git_branch: main
@abh
Copy link
Author

abh commented Jun 2, 2023

Ah, via one of your other repositories I found ansible/molecule#3903

@abh
Copy link
Author

abh commented Jun 5, 2023

Maybe this is the same issue @stefangweichinger had in #14?

@stefangweichinger
Copy link

stefangweichinger commented Jun 22, 2023

@abh hi, just read your msg. Did you fix it already? I also want to upgrade a CI-pipeline and hit errors. So far I haven't spent much time to look closer, will try asap.

Just as a pointer: this is my state of things: https://github.com/stefangweichinger/ansible-rclone/actions/runs/5344772358

@stefangweichinger
Copy link

managed to update and fix my pipeline, stayed with 4.0.9 in main so far, but already have 5.0.2 testing OK in a branch

@stefangweichinger
Copy link

@abh I don't see your molecule.yml but I assume you might also solve this by removing the "lint" steps from the molecule scenario. This helped in my case (among other changes). Linting is done in a job previous to molecule.

@stefangweichinger
Copy link

Let me add one more here: in my case 5.0.2 works, 5.0.3 does not:

https://github.com/stefangweichinger/ansible-rclone/actions/runs/5511469454/jobs/10047069996

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

No branches or pull requests

2 participants