diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 40c31754..d90a7c55 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -97,11 +97,4 @@ jobs: node-version: ${{ matrix.node }} - name: Test ๐Ÿงช - run: npm run coverage - - name: Codecov โ˜‚ - uses: codecov/codecov-action@v4 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - if: ${{ matrix.node == env.COVERAGE_VERSION }} - with: - directory: coverage + run: npm run test diff --git a/.github/workflows/storybook-tests.yml b/.github/workflows/storybook-tests.yml new file mode 100644 index 00000000..bcebba9c --- /dev/null +++ b/.github/workflows/storybook-tests.yml @@ -0,0 +1,29 @@ +name: Storybook Tests + +on: deployment_status + +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + if: github.event.deployment_status.state == 'success' + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + - name: Install dependencies + run: yarn + - name: Install Playwright + run: npx playwright install --with-deps + - name: Run Storybook tests + run: yarn test-storybook -- --ci --coverage + env: + TARGET_URL: "${{ github.event.deployment_status.target_url }}" + - name: Codecov โ˜‚ + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + if: ${{ matrix.node == env.COVERAGE_VERSION }} + with: + directory: coverage