Skip to content

🤖 Bip Bop - Fusion Framework Pre-Release (next) #15525

🤖 Bip Bop - Fusion Framework Pre-Release (next)

🤖 Bip Bop - Fusion Framework Pre-Release (next) #15525

Workflow file for this run

name: PR
on:
pull_request:
types:
- ready_for_review
- opened
- reopened
- synchronize
paths-ignore:
- '.changeset/**'
- 'vue-press/**'
concurrency:
group: pr-${{ github.event.pull_request.id }}
cancel-in-progress: true
permissions:
contents: read
pages: write
id-token: write
pull-requests: write
jobs:
code-quality:
name: Check Code
runs-on: fusion-gh-runner-fusion-framework
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
REVIEWDOG_REPORTER: ${{ (github.event.pull_request.draft && 'github-pr-check') || 'github-pr-review' }}
CHECKOUT_FETCH_DEPTH: ${{ (github.actor != 'dependabot[bot]' && '0') || '1' }}
steps:
- uses: actions/checkout@v7
with:
ref: "${{ github.event.pull_request.head.sha }}"
fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }}
# fusion-gh-runner-fusion-framework's image doesn't ship gh (tracked with
# infra); install it until the runner image is patched.
- name: Setup fusion runner
continue-on-error: true
uses: ./.github/actions/setup-fusion-runner
- name: Setup node and install deps
uses: ./.github/actions/node-setup
- uses: reviewdog/action-setup@v1
- name: Delete GitHub Actions comments
uses: actions/github-script@v9
with:
script: |
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
// Delete all GitHub Actions bot comments (they will be regenerated)
const githubActionsComments = comments.filter(comment =>
comment.user && comment.user.login === 'github-actions[bot]'
);
console.log(`Found ${githubActionsComments.length} GitHub Actions comments to delete`);
await Promise.all(
githubActionsComments.map(comment =>
github.rest.issues.deleteComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment.id,
})
)
);
- name: Lint source files
uses: mongolyy/reviewdog-action-biome@v2
with:
github_token: ${{ github.token }}
reporter: ${{ env.REVIEWDOG_REPORTER }}
level: error
- name: Build fusion-lint
run: pnpm build:lint
- name: Fusion lint
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
run: |
pnpm exec fusion-lint changed --reporter=rdjsonl \
| reviewdog \
-name="fusion-lint" \
-f=rdjsonl \
-reporter=${{ env.REVIEWDOG_REPORTER }} \
-fail-level=error
- name: Build affected packages
id: build
continue-on-error: true
uses: ./.github/actions/build-packages
with:
only-affected: true
- name: process-build-log
run: node process-turbo-build-log.cjs > tsc-build.log
- name: upload build log
uses: actions/upload-artifact@v7
with:
path: tsc-build.log
- name: Review build log
run: cat tsc-build.log | reviewdog -name=tsc -f=tsc -reporter=${{ env.REVIEWDOG_REPORTER }} -fail-level=error
- name: Check if build failed
if: steps.build.outcome == 'failure'
run: exit 1
- name: Install Playwright browsers
# `playwright` isn't a root dependency, so `pnpm exec` needs a --filter into a package that
# has it (react-app, vitest-plugin-react-app); the installed browser cache is shared, so
# this covers both packages' Vitest Browser Mode tests
run: pnpm --filter @equinor/fusion-framework-vitest-plugin-react-app exec playwright install --with-deps chromium
- name: Create Test Report
run: pnpm test run