diff --git a/.github/actions/test-kitchen/action.yml b/.github/actions/test-kitchen/action.yml new file mode 100644 index 00000000..ceedf220 --- /dev/null +++ b/.github/actions/test-kitchen/action.yml @@ -0,0 +1,25 @@ +name: 'Test Kitchen Action' +description: 'Runs Test Kitchen tests with the specified suite and OS' +inputs: + suite: + description: 'Test suite to run' + required: true + os: + description: 'OS to test on' + required: true + +runs: + using: "composite" + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + - name: Dokken + uses: actionshub/test-kitchen@3.0.0 + env: + CHEF_LICENSE: accept-no-persist + KITCHEN_LOCAL_YAML: kitchen.dokken.yml + with: + suite: ${{ inputs.suite }} + os: ${{ inputs.os }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b0335ee..20cb4128 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,72 +17,66 @@ jobs: statuses: write issues: write - integration-epel: + integration: needs: lint-unit runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - os: - - "almalinux-8" - - "almalinux-9" - - "centos-stream-8" - - "centos-stream-9" - - "rockylinux-8" - - "rockylinux-9" - suite: - - "epel" - steps: &steps - - name: Check out code - uses: actions/checkout@v4 - - name: Install Chef - uses: actionshub/chef-install@3.0.0 - - name: Dokken - uses: actionshub/test-kitchen@3.0.0 - env: - CHEF_LICENSE: accept-no-persist - KITCHEN_LOCAL_YAML: kitchen.dokken.yml - with: - suite: ${{ matrix.suite }} - os: ${{ matrix.os }} + os: [ + "almalinux-8", + "almalinux-9", + "amazonlinux-2023", + "centos-stream-8", + "centos-stream-9", + "debian-11", + "debian-12", + "rockylinux-8", + "rockylinux-9", + "ubuntu-2204", + "ubuntu-2404", + ] + suite: ["distro", "repo", "repo-overrides"] + steps: + - uses: ./.github/actions/test-kitchen + with: + suite: ${{ matrix.suite }} + os: ${{ matrix.os }} - integration-nginx-full: + integration-epel: needs: lint-unit runs-on: ubuntu-latest strategy: - matrix: - os: - - "ubuntu-2204" - - "ubuntu-2404" - suite: - - "distro-nginx-full" fail-fast: false + matrix: + os: [ + "almalinux-8", + "almalinux-9", + "centos-stream-8", + "centos-stream-9", + "rockylinux-8", + "rockylinux-9", + ] + suite: ["epel"] steps: - <<: *steps + - uses: ./.github/actions/test-kitchen + with: + suite: ${{ matrix.suite }} + os: ${{ matrix.os }} - integration: + integration-nginx-full: needs: lint-unit runs-on: ubuntu-latest strategy: - matrix: - os: - - "almalinux-8" - - "almalinux-9" - - "amazonlinux-2023" - - "centos-stream-8" - - "centos-stream-9" - - "debian-11" - - "debian-12" - - "rockylinux-8" - - "rockylinux-9" - - "ubuntu-2204" - - "ubuntu-2404" - suite: - - "distro" - - "repo" - - "repo-overrides" fail-fast: false + matrix: + os: ["ubuntu-2204", "ubuntu-2404"] + suite: ["distro-nginx-full"] steps: - <<: *steps + - uses: ./.github/actions/test-kitchen + with: + suite: ${{ matrix.suite }} + os: ${{ matrix.os }} final: runs-on: ubuntu-latest