Skip to content

Remove secret-scan workflow (unusable on public repo) #5889

Remove secret-scan workflow (unusable on public repo)

Remove secret-scan workflow (unusable on public repo) #5889

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
branches:
- master # triggers the flow for every PR to master
- 'feature/**' # triggers the flow for a PR to a branch like feature/v9
types:
- synchronize # PR was updated
- opened # PR was open
- reopened # PR was closed and is now open again
- ready_for_review # PR was converted from draft to open
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
static-checks:
if: ${{ github.event.pull_request.head.ref != 'changeset-release/master' }}
name: Static checks
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
issues: write
pull-requests: write
timeout-minutes: 45
steps:
- name: Checkout
# Same as actions/checkout@v5
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
with:
fetch-depth: 0
- name: Set up Node.js
# Same as actions/setup-node@v6.1
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f
with:
node-version: 22.20.0
- name: Check missing changeset
uses: ./.github/actions/report-missing-changeset
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable
# packages will be blocked from merging.
- name: Dependency Review
# Skip on the pnpm migration PR: GitHub's dependency-graph compare
# API returns 502 when diffing yarn.lock <-> pnpm-lock.yaml. Once
# this branch lands, master will have pnpm-lock.yaml and subsequent
# PRs will diff cleanly. Tracked in actions/dependency-review-action#398.
if: ${{ github.head_ref != 'bill-migrate-to-pnpm' }}
uses: actions/dependency-review-action@v4
- name: Install Dependencies
uses: ./.github/actions/pnpm-install
- name: Update PR Body
run: node ./.github/actions/update-body.js
env:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Syncpack check
run: pnpm syncpack:list
- name: Circularity Check
run: pnpm circularity
- name: Lint
run: pnpm lint
- name: Type Check
run: pnpm typecheck
- name: Jest Tests
run: pnpm test:unit:ci
storybook-visual-tests:
if: ${{ github.event.pull_request.head.ref != 'changeset-release/master' }}
name: Storybook Visual Tests
runs-on: ubuntu-latest
permissions:
contents: read
needs: [static-checks]
steps:
- name: Checkout
# Same as actions/checkout@v5
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
- name: Set up Node.js
# Same as actions/setup-node@v6.1
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f
with:
node-version: 22.20.0
- name: Install dependencies from cache
uses: ./.github/actions/pnpm-install
- name: Visual Tests
run: pnpm happo:storybook
env:
HAPPO_PROJECT: Picasso/Storybook
HAPPO_API_KEY: ${{ secrets.HAPPO_API_KEY }}
HAPPO_API_SECRET: ${{ secrets.HAPPO_API_SECRET }}
integration-tests:
name: Integration Tests
uses: ./.github/workflows/davinci-integration-tests.yml
secrets:
HAPPO_API_KEY: ${{ secrets.HAPPO_API_KEY }}
HAPPO_API_SECRET: ${{ secrets.HAPPO_API_SECRET }}
deploy-picasso-docs:
if: ${{ github.event.pull_request.head.ref != 'changeset-release/master' }}
name: Deploy Picasso docs
runs-on: ubuntu-latest
concurrency:
group: gh-pages-deployment
cancel-in-progress: false
permissions:
contents: write
pull-requests: write
pages: write
id-token: write
needs: [static-checks]
steps:
- name: Checkout
# Same as actions/checkout@v5
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
- name: Set up Node.js
# Same as actions/setup-node@v6.1
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f
with:
node-version: 22.20.0
- name: Install dependencies from cache
uses: ./.github/actions/pnpm-install
- name: Setup GitHub Pages content
uses: ./.github/actions/setup-gh-pages
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build Storybook
run: pnpm build:storybook
- name: Generate LLM docs
run: |
pnpm generate:llm-docs
cp -r llm-docs build/storybook/llm-docs
- name: Prepare PR preview deployment
uses: ./.github/actions/prepare-deployment
with:
deployment-type: pr-preview
pr-number: ${{ github.event.pull_request.number }}
build-path: build/storybook
content-path: gh-pages-content
- name: Deploy to GitHub Pages
id: deployment
uses: ./.github/actions/deploy-to-gh-pages
with:
content-path: gh-pages-content
deployment-name: 'PR #${{ github.event.pull_request.number }} Preview'
- name: Comment on PR
# Same as actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
with:
script: |
const prNumber = '${{ github.event.pull_request.number }}';
const deployUrl = `https://toptal.github.io/picasso/prs/${prNumber}/`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: '📖 **Storybook Preview**\n\n🚀 Your Storybook preview is ready: **[View Storybook](' + deployUrl + ')**\n\n📍 Preview URL: `' + deployUrl + '`\n\nThis preview is updated automatically when you push changes to this PR.'
});