Skip to content

Bump ai-integrations workspace to 1.49.4 #26235

Bump ai-integrations workspace to 1.49.4

Bump ai-integrations workspace to 1.49.4 #26235

Workflow file for this run

name: CI
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
find-changed-workspaces:
name: Detect workspace changes
runs-on: ubuntu-latest
outputs:
workspaces: ${{ steps.find-changed-workspaces.outputs.workspaces }}
steps:
- name: Calculate number of commits in PR
id: calculate-commits
env:
COMMITS: ${{ github.event.pull_request.commits }}
run: echo "NUMBER_OF_COMMITS=$(($COMMITS + 1))" >> $GITHUB_ENV
- name: Checkout base branch for diff purposes
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.event.pull_request.base.ref }}
fetch-depth: 50 # TODO(awanlin): Temporary fix
- name: Checkout head branch
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
# Needed for diff
fetch-depth: ${{ env.NUMBER_OF_COMMITS }}
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: Find changed workspaces
id: find-changed-workspaces
run: node ./scripts/ci/list-workspaces-with-changes.js
env:
BASE_REF: origin/${{ github.event.pull_request.base.ref }}
ci:
name: Workspace ${{ matrix.workspace }}, CI step for node ${{ matrix.node-version }}
runs-on: ubuntu-latest
needs: find-changed-workspaces
strategy:
matrix:
workspace: ${{ fromJSON(needs.find-changed-workspaces.outputs.workspaces) }}
node-version: [24]
fail-fast: false
defaults:
run:
working-directory: ./workspaces/${{ matrix.workspace }}
env:
CI: true
NODE_OPTIONS: --max-old-space-size=8192
steps:
- name: Checkout main branch for tests purposes
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: main
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
run: yarn install --immutable
- name: check for missing repo fixes
run: yarn fix --check
- name: validate config
if: ${{ hashFiles(format('workspaces/{0}/app-config.yaml', matrix.workspace)) != '' }}
run: yarn backstage-cli config:check --lax
- name: type checking and declarations
run: yarn tsc:full
- name: prettier
run: yarn prettier:check
- name: read knip-reports flag from bcp.json
id: bcp
run: |
echo "Checking for bcp.json in workspace: workspaces/${{ matrix.workspace }}"
if [ -f bcp.json ]; then
echo "Reading knip-reports flag..."
KNIP_REPORTS=$(jq -r '.["knip-reports"]' bcp.json)
echo "knip-reports value: $KNIP_REPORTS"
echo "knip_reports=$KNIP_REPORTS" >> $GITHUB_OUTPUT
else
echo "bcp.json not found. Defaulting knip_reports to false."
echo "knip_reports=false" >> $GITHUB_OUTPUT
fi
- name: check knip reports
if: ${{ steps.bcp.outputs.knip_reports == 'true' }}
run: yarn build:knip-reports --ci
- name: check api reports and generate API reference
run: yarn build:api-reports:only --ci
- name: build all packages
run: yarn backstage-cli repo build --all
- name: lint
run: yarn backstage-cli repo lint --since origin/main
- name: publish check
run: yarn backstage-cli repo fix --check --publish
- name: Install jest-junit reporter
run: |
npm install jest-junit@17.0.0 --ignore-scripts --prefix ${{ runner.temp }}/jest-junit
mkdir -p ${{ runner.temp }}/test-results/${{ matrix.workspace }}
- name: Test changed packages
id: tests
env:
JEST_JUNIT_OUTPUT_DIR: ${{ runner.temp }}/test-results/${{ matrix.workspace }}
JEST_JUNIT_CLASSNAME: '{filepath}'
JEST_JUNIT_UNIQUE_OUTPUT_NAME: 'true'
run: yarn test:all --maxWorkers=3 --reporters=default --reporters=${{ runner.temp }}/jest-junit/node_modules/jest-junit
- name: Upload coverage to Codecov
if: ${{ !cancelled() && steps.tests.outcome != 'skipped' }}
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
flags: ${{ matrix.workspace }}
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
- name: Upload test results to Codecov
if: ${{ !cancelled() && steps.tests.outcome != 'skipped' }}
uses: codecov/test-results-action@6ba3fdeec616fb91fd6a389b788a2366835a0fa2 # v1.2.1
with:
flags: ${{ matrix.workspace }}
token: ${{ secrets.CODECOV_TOKEN }}
directory: ${{ runner.temp }}/test-results/${{ matrix.workspace }}
fail_ci_if_error: false
- name: install playwright
if: ${{ hashFiles(format('workspaces/{0}/playwright.config.ts', matrix.workspace)) != '' }}
run: yarn playwright install --with-deps chromium chrome
- name: run playwright tests
if: ${{ hashFiles(format('workspaces/{0}/playwright.config.ts', matrix.workspace)) != '' }}
run: yarn playwright test
- name: ensure clean working directory
run: |
if files=$(git ls-files --exclude-standard --others --modified) && [[ -z "$files" ]]; then
exit 0
else
echo ""
echo "Working directory has been modified:"
echo ""
git status --short
echo ""
exit 1
fi
verify:
name: Workspace ${{ matrix.workspace }}, Verify step
runs-on: ubuntu-latest
needs: find-changed-workspaces
strategy:
matrix:
workspace: ${{ fromJSON(needs.find-changed-workspaces.outputs.workspaces) }}
fail-fast: false
steps:
- name: Checkout head branch
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24
- name: Install root dependencies
run: yarn install --immutable
- name: Verify lockfile duplicates
run: node scripts/ci/verify-lockfile-duplicates.js workspaces/${{ matrix.workspace }}/yarn.lock
- name: Verify changesets
run: node scripts/ci/verify-changesets.js ${{ matrix.workspace }}
result:
if: ${{ always() }}
name: check all required jobs
runs-on: ubuntu-latest
needs: [ci, verify]
steps:
- run: exit 1
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
}}