Skip to content

Commit

Permalink
Fix CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
dometto committed Oct 24, 2023
1 parent 94d624a commit 5d47065
Showing 1 changed file with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,19 @@ name: Molecule
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
molecule:
provide_scenarios:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
scenario:
- centos-8
- debian-10
- fedora-34
- oraclelinux-8
- ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: Get changed files
id: changed-files-yaml
uses: tj-actions/changed-files@v39
Expand All @@ -35,11 +26,25 @@ jobs:
- 'playbooks/*.yml'
roles:
- 'playbooks/roles/**/**'
- name: Debug
run: echo ${{ steps.changed-files-yaml.outputs.all_changed_files }}
outputs:
matrix: ${{ steps.changed-files-yaml.outputs.all_changed_files }}
molecule:
needs: provide_scenarios
strategy:
fail-fast: false
matrix:
scenario: ${{ fromJson(needs.provide_scenarios.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: Molecule tests for playbooks
uses: gofrolist/molecule-action@v2
if: steps.changed-files-yaml.outputs.playbooks_any_changed == 'true'
with:
molecule_command: test
molecule_args: --scenario-name ${{ steps.changed-files-yaml.outputs.playbooks_all_changed_files }}
molecule_args: --scenario-name ${{ matrix.scenario }}
env:
ANSIBLE_FORCE_COLOR: '1'

0 comments on commit 5d47065

Please sign in to comment.