ProductDoctor: Add support for the new availability mode #2389
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: QA | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-lock: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: "package.json" | |
| # Don't cache in this job as we don't install dependencies | |
| - name: Audit dependencies | |
| run: pnpm audit --audit-level moderate | |
| tsc-and-linters: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: "package.json" | |
| cache: "pnpm" | |
| - name: Install deps | |
| run: pnpm install | |
| - name: Run tsc | |
| run: pnpm run check-types | |
| - name: Run lint | |
| run: pnpm run lint | |
| - name: Check for uncommitted lint changes | |
| run: git diff --exit-code ./src | |
| - name: Check Prettier formatting | |
| run: pnpm run format:check | |
| jest-tests: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: "package.json" | |
| cache: "pnpm" | |
| - name: Install deps | |
| run: pnpm install | |
| - name: Run tests | |
| run: pnpm run test:ci | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: saleor/saleor-dashboard | |
| directory: coverage/units | |
| flags: units | |
| translation-messages: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: "package.json" | |
| cache: "pnpm" | |
| - name: Install deps | |
| run: pnpm install | |
| - name: Check message extraction | |
| run: | | |
| pnpm run extract-messages | |
| git diff --exit-code ./locale | |
| storybook-tests: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| container: | |
| # https://mcr.microsoft.com/en-us/artifact/mar/playwright/tags | |
| image: mcr.microsoft.com/playwright:v1.58.2-noble@sha256:6446946a1d9fd62d9ae501312a2d76a43ee688542b21622056a372959b65d63d | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: "package.json" | |
| cache: "pnpm" | |
| - name: Install deps | |
| run: pnpm install | |
| - name: Run Storybook tests | |
| run: pnpm run test-storybook:coverage | |
| - name: Upload coverage reports to Codecov | |
| if: always() | |
| uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: saleor/saleor-dashboard | |
| directory: coverage/storybook | |
| flags: storybook | |
| chromatic: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: "package.json" | |
| cache: "pnpm" | |
| - name: Install deps | |
| run: pnpm install | |
| - name: Run Chromatic | |
| uses: chromaui/action@c93e0bc3a63aa176e14a75b61a31847cbfdd341c # v11.27.0 | |
| with: | |
| projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| exitZeroOnChanges: true | |
| autoAcceptChanges: main | |
| onlyChanged: true | |
| zip: true |