diff --git a/.github/workflows/plugins_react_tests.yml b/.github/workflows/plugins_react_tests.yml index c873348a5413..2cd853011fca 100644 --- a/.github/workflows/plugins_react_tests.yml +++ b/.github/workflows/plugins_react_tests.yml @@ -13,27 +13,43 @@ permissions: contents: read jobs: + setup_matrix: + name: Setup matrix + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.build_matrix.outputs.matrix }} + steps: + - name: Build test matrix + id: build_matrix + run: | + curl --silent --show-error --fail --output matrix.json https://raw.githubusercontent.com/theforeman/foreman/${{ github.base_ref }}/.github/matrix.json + cat >matrix_include.json <> "$GITHUB_OUTPUT" + test: + name: ${{ matrix.org }}/${{ matrix.repo }} with Ruby ${{ matrix.ruby }} and Node ${{ matrix.node }} runs-on: ubuntu-latest + needs: setup_matrix timeout-minutes: 20 strategy: fail-fast: false - matrix: - include: - - repo: katello - org: Katello - - repo: foreman-tasks - org: theforeman + matrix: ${{ fromJson(needs.setup_matrix.outputs.matrix) }} steps: - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: ${{ matrix.node }} # We could update the postinstall action for foreman to look for an environment variable for plugin webpack dirs # before kicking off the ruby script to find them, this would eliminate the ruby dep and running `npm install` in plugins. - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: ${{ matrix.ruby }} - name: Checkout Foreman uses: actions/checkout@v4 with: