Throw if apiKey or apiSecret are missing in config file #163
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| FORCE_COLOR: 1 | |
| HAPPO_API_KEY: ${{ secrets.HAPPO_API_KEY }} | |
| HAPPO_API_SECRET: ${{ secrets.HAPPO_API_SECRET }} | |
| PNPM_STORE_DIR: ./.cache/pnpm | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22, 24] | |
| name: Test (Node ${{ matrix.node-version }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-env | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Log environment variables | |
| run: node -e "console.log(JSON.stringify(Object.fromEntries(Object.entries(process.env).sort()), null, 2))" | |
| - run: pnpm test --coverage | |
| orchestrate-happo: | |
| runs-on: ubuntu-latest | |
| name: Orchestrate Happo Job | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/orchestrate-happo | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| happo-api-key: ${{ secrets.HAPPO_API_KEY }} | |
| happo-api-secret: ${{ secrets.HAPPO_API_SECRET }} | |
| projects: 'cypress,storybook-v9,storybook-v10,playwright,custom,pages' | |
| cypress: | |
| runs-on: ubuntu-latest | |
| name: Cypress | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-env | |
| - uses: ./.github/actions/setup-cypress | |
| - run: pnpm test:cypress | |
| custom: | |
| runs-on: ubuntu-latest | |
| name: Happo Custom | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-env | |
| - run: pnpm test:custom | |
| pages: | |
| runs-on: ubuntu-latest | |
| name: Happo Pages | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-env | |
| - run: pnpm test:pages | |
| storybook: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - version: 9 | |
| dependencies: 'storybook@9 @storybook/builder-vite@9 @storybook/react-vite@9' | |
| - version: 10 | |
| dependencies: '' | |
| name: Storybook v${{ matrix.version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-env | |
| - if: matrix.dependencies != '' | |
| run: pnpm add -D ${{ matrix.dependencies }} | |
| - run: pnpm test:storybook | |
| env: | |
| HAPPO_STORYBOOK_VERSION: ${{ matrix.version }} | |
| playwright: | |
| runs-on: ubuntu-latest | |
| name: Playwright | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/setup-env | |
| - uses: ./.github/actions/setup-playwright | |
| - run: pnpm test:playwright | |
| typescript: | |
| runs-on: ubuntu-latest | |
| name: TypeScript | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-env | |
| - run: pnpm tsc | |
| eslint: | |
| runs-on: ubuntu-latest | |
| name: ESLint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-env | |
| - run: pnpm lint |