Bump actions/checkout from 3 to 4 #1
This file contains 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: (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 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repo: katello | |
org: Katello | |
- repo: foreman-tasks | |
org: theforeman | |
steps: | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '12.x' | |
# 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 | |
- name: Checkout Foreman | |
uses: actions/checkout@v4 | |
with: | |
path: ./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.repo }} | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ matrix.org }}/${{ matrix.repo }} | |
path: ./projects/${{ matrix.repo }} | |
- name: Generate ${{ matrix.repo }} npm dependencies package-lock | |
run: npm install --package-lock-only --no-audit | |
working-directory: ${{ github.workspace }}/projects/${{ matrix.repo }} | |
- name: Install ${{ matrix.repo }} npm dependencies | |
run: npm ci --no-audit | |
working-directory: ${{ github.workspace }}/projects/${{ matrix.repo }} | |
- name: Run ${{ matrix.plugin_repo }} tests | |
run: npm test | |
working-directory: ${{ github.workspace }}/projects/${{ matrix.repo }} |