remove branch restriction for molecule tests #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Molecule Test | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Molecule Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| scenario: | |
| - default | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Molecule and dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r molecule/requirements.txt | |
| ansible-galaxy collection install -r molecule/collections.yml | |
| - name: Run Molecule tests | |
| run: | | |
| molecule test -s ${{ matrix.scenario }} | |
| env: | |
| MOLECULE_ROLE_NAME_CHECK: false | |
| - name: Upload Molecule logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: molecule-logs-${{ matrix.scenario }} | |
| path: | | |
| molecule/${{ matrix.scenario }}/.molecule/ | |
| molecule/${{ matrix.scenario }}/.cache/ | |
| retention-days: 7 |