From f296b66b3771f059da50a6de3e76256e68d9b330 Mon Sep 17 00:00:00 2001 From: Jev Forsberg <46619047+baldm0mma@users.noreply.github.com> Date: Tue, 11 Mar 2025 15:27:54 -0600 Subject: [PATCH] Chore: Migrate storybook verification to GHAs (#101968) * baldm0mma/ add storybook-verification workflow file * baldm0mma/ build out storybook jobs to drone spec * baldm0mma/ add node fallback and remove runner id * baldm0mma/ replace with cypress action * baldm0mma/ update codeowners * baldm0mma/ add workflow dispatch for testing * baldm0mma/ update trigger for testing * baldm0mma/ update path * baldm0mma/ update paths * baldm0mma/ update node file --- .github/CODEOWNERS | 1 + .github/workflows/storybook-verification.yml | 40 ++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/storybook-verification.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7ff10207c35..d6ebd9a6a09 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -798,6 +798,7 @@ embed.go @grafana/grafana-as-code /.github/workflows/remove-milestone.yml @grafana/grafana-developer-enablement-squad /.github/workflows/scripts/json-file-to-job-output.js @grafana/plugins-platform-frontend /.github/workflows/stale.yml @grafana/grafana-developer-enablement-squad +/.github/workflows/storybook-verification.yml @grafana/grafana-frontend-platform /.github/workflows/update-changelog.yml @grafana/grafana-developer-enablement-squad /.github/workflows/update-make-docs.yml @grafana/docs-tooling /.github/workflows/scripts/kinds/verify-kinds.go @grafana/platform-monitoring diff --git a/.github/workflows/storybook-verification.yml b/.github/workflows/storybook-verification.yml new file mode 100644 index 00000000000..72eb6a4ad4c --- /dev/null +++ b/.github/workflows/storybook-verification.yml @@ -0,0 +1,40 @@ +name: Verify Storybook + +on: + pull_request: + paths: + - 'packages/grafana-ui/**' + - '.github/workflows/storybook-verification.yml' + - '!docs/**' + - '!*.md' + +jobs: + verify-storybook: + name: Verify Storybook + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: 'package.json' + cache: 'yarn' + + - name: Install dependencies + run: yarn install --immutable + + - name: Run Storybook and E2E tests + uses: cypress-io/github-action@v6 + with: + browser: chrome + start: yarn storybook --quiet + wait-on: 'http://localhost:9001' + wait-on-timeout: 60 + command: yarn e2e:storybook + install: false + env: + HOST: localhost + PORT: 9001