Skip to content

chore(deps): update devdependencies (non-major) #23266

chore(deps): update devdependencies (non-major)

chore(deps): update devdependencies (non-major) #23266

Workflow file for this run

# Copyright Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: PR
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- release-1.9
- release-1.1[0-9]
env:
TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }}
TURBO_SCM_HEAD: ${{ github.sha }}
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.event.pull_request.head.ref }}
cancel-in-progress: true
jobs:
build:
name: Build with Node.js
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- name: Check Image and Relevant Changes
id: check-image
uses: ./.github/actions/check-image-and-changes
- name: Setup Node.js
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: '.nvmrc'
registry-url: "https://registry.npmjs.org"
- name: Setup local Turbo cache
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1.3.0
with:
cache-prefix: turbogha-pr-${{ github.event.number }}
- name: Use app-config.example.yaml
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
run: rm app-config.yaml && mv app-config.example.yaml app-config.yaml
- name: Install dependencies
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
uses: backstage/actions/yarn-install@2cd6978b476cbdc39fec48346f8b6ca13199dd6a # v0.7.8
with:
cache-prefix: ${{ runner.os }}-${{ hashFiles('.nvmrc') }}
- name: Build packages
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
run: yarn run build --continue --affected
test:
name: Test with Node.js
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- name: Check Image and Relevant Changes
id: check-image
uses: ./.github/actions/check-image-and-changes
- name: Setup Node.js
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: '.nvmrc'
registry-url: "https://registry.npmjs.org"
- name: Setup local Turbo cache
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1.3.0
with:
cache-prefix: turbogha-pr-${{ github.event.number }}
- name: Use app-config.example.yaml
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
run: rm app-config.yaml && mv app-config.example.yaml app-config.yaml
- name: Install dependencies
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
uses: backstage/actions/yarn-install@2cd6978b476cbdc39fec48346f8b6ca13199dd6a # v0.7.8
with:
cache-prefix: ${{ runner.os }}-${{ hashFiles('.nvmrc') }}
- name: Run prettier
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
run: yarn prettier:check --continue --affected
- name: Run lint
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
run: yarn run lint:check --continue --affected
- name: Run monorepo tools
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
run: yarn run monorepo:check
- name: Regenerate dockerfiles
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
run: |
yarn run build:dockerfile; if [[ $(git diff --name-only | grep Dockerfile || true) != "" ]]; then \
echo "ERROR: Workspace is dirty! Must run 'yarn build:dockerfile' and commit changes!"; exit 1; \
fi
- name: Install jest-junit reporter
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
run: |
npm install jest-junit@17.0.0 --ignore-scripts --prefix ${{ runner.temp }}/jest-junit
ln -s ${{ runner.temp }}/jest-junit/node_modules/jest-junit node_modules/jest-junit
mkdir -p ${{ runner.temp }}/test-results
- name: Run tests
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
id: tests
env:
JEST_JUNIT_OUTPUT_DIR: ${{ runner.temp }}/test-results
JEST_JUNIT_CLASSNAME: '{filepath}'
JEST_JUNIT_UNIQUE_OUTPUT_NAME: 'true'
run: yarn run test --continue --affected -- --reporters=default --reporters=jest-junit
- name: Upload coverage to Codecov
if: ${{ steps.check-image.outputs.is_skipped != 'true' && !cancelled() }}
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6.0.2
with:
flags: rhdh
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
- name: Upload test results to Codecov
if: ${{ steps.check-image.outputs.is_skipped != 'true' && !cancelled() && steps.tests.outcome != 'skipped' }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
with:
flags: rhdh
token: ${{ secrets.CODECOV_TOKEN }}
directory: ${{ runner.temp }}/test-results
fail_ci_if_error: false
- name: Install dynamic plugin dependencies
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
working-directory: dynamic-plugins
run: yarn install
- name: Test the dynamic plugin wrappers
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
working-directory: dynamic-plugins
run: yarn test --continue --affected
- name: Export the dynamic plugin wrappers
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
working-directory: dynamic-plugins
run: yarn export-dynamic --continue --affected