Skip to content

Fixes #39340 - Merge page logic and styles from TableIndexPage to PageLayout #4106

Fixes #39340 - Merge page logic and styles from TableIndexPage to PageLayout

Fixes #39340 - Merge page logic and styles from TableIndexPage to PageLayout #4106

name: (non-blocking) React on plugins
on:
pull_request:
branches: [develop]
paths:
- 'webpack/**'
- 'package.json'
- 'config/webpack.config.js'
- '.github/workflows/plugins_react_tests.yml'
permissions:
contents: read
concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: true
env:
BUNDLE_WITHOUT: "console:development:journald:libvirt"
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
uses: theforeman/gha-matrix-builder@v0
test:
name: ${{ matrix.plugin.name }} with Ruby ${{ matrix.ruby }} and Node ${{ matrix.node }}
runs-on: ubuntu-latest
needs: setup_matrix
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.setup_matrix.outputs.matrix).ruby }}
node: ${{ fromJson(needs.setup_matrix.outputs.matrix).node }}
plugin:
- name: foreman-tasks
repo: theforeman/foreman-tasks
- name: katello
repo: Katello/katello
steps:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Checkout Foreman
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}/projects/foreman
- name: Generate Foreman npm dependencies package-lock
run: npm install --package-lock-only --no-audit
working-directory: ${{ github.workspace }}/projects/foreman
- name: Install Foreman npm dependencies
run: npm ci --no-audit
working-directory: ${{ github.workspace }}/projects/foreman
- name: Checkout ${{ matrix.plugin.repo }}
uses: actions/checkout@v4
with:
repository: ${{ matrix.plugin.repo }}
path: ${{ github.workspace }}/projects/plugin
- name: Set up plugin in Foreman
run: |
echo "gemspec name: '${{ matrix.plugin.name }}', path: '${{ github.workspace }}/projects/plugin'" > "bundler.d/${{ matrix.plugin.name }}.local.rb"
if [ -d ${{ matrix.plugin.name }}/gemfile.d ] ; then
cat ${{ matrix.plugin.name }}/gemfile.d/*.rb >> bundler.d/${{ matrix.plugin.name }}.local.rb
fi
working-directory: ${{ github.workspace }}/projects/foreman
- name: "Set up Ruby ${{ matrix.ruby }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
working-directory: ${{ github.workspace }}/projects/foreman
- name: Generate ${{ matrix.plugin.name }} npm dependencies package-lock
run: npm install --package-lock-only --no-audit --legacy-peer-deps
working-directory: ${{ github.workspace }}/projects/plugin
- name: Install ${{ matrix.plugin.name }} npm dependencies
run: npm ci --no-audit --legacy-peer-deps
working-directory: ${{ github.workspace }}/projects/plugin
- name: Run ${{ matrix.plugin.name }} tests
run: npm run test:plugins ${{ matrix.plugin.name }}
working-directory: ${{ github.workspace }}/projects/foreman