Skip to content

Commit

Permalink
fixup! ci: deploy playwright reports with surge
Browse files Browse the repository at this point in the history
  • Loading branch information
DSil committed Feb 7, 2024
1 parent 50a6ecc commit 8d50de1
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ jobs:
strategy:
fail-fast: false
matrix:
shard: [1/4, 2/4, 3/4, 4/4]
shardIndex: [1, 2, 3, 4]
shardTotal: [4]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -144,42 +145,43 @@ jobs:
yarn tailwind-preset build
yarn components build
- name: Test Components
run: yarn components test-ct --shard ${{ matrix.shard }}
continue-on-error: true
run: yarn components test-ct --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --reporter=blob
- name: Upload blob report artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: blob-report-${{ matrix.shard }}
path: blob-report
name: blob-report-${{ matrix.shardIndex }}
path: packages/orbit-components/blob-report
retention-days: 2

test-ct-report:
name: Test Components Report
runs-on: ubuntu-latest
env:
REPORTS: "false"
if: always()
needs: test-ct
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install
uses: ./.github/actions/node
- name: Download blob reports artifacts
id: download
uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- name: Merge into HTML Report
run: npx playwright merge-reports --reporter html ./all-blob-reports || echo "REPORTS=true"
if: ${{ steps.download.outputs.download-path != '' }}
run: |
echo ${{ steps.download.outputs.download-path }}
npx playwright merge-reports --reporter html ./all-blob-reports
- name: Upload Reporter
if: ${{ env.REPORTS == 'true' }}
if: ${{ steps.download.outputs.download-path != '' }}
env:
BRANCH_NAME: ${{ github.head_ref }}
run: |
echo ${BRANCH_NAME}
BRANCH_URL=$(echo ${BRANCH_NAME} | sed -e 's/[^a-zA-Z0-9]/-/g')
echo ${BRANCH_URL}
DOMAIN=https://kiwicom-orbit-test-report-${BRANCH_URL}.surge.sh
yarn components deploy:report ${DOMAIN} --token ${{ secrets.SURGE_TOKEN }}
Expand Down

0 comments on commit 8d50de1

Please sign in to comment.