Skip to content

Commit 1489fa6

Browse files
authored
Merge branch 'main' into isomorphic-theme-provider
2 parents 9ec9922 + 6881c99 commit 1489fa6

File tree

12 files changed

+850
-990
lines changed

12 files changed

+850
-990
lines changed

.github/workflows/pr-preview-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
app-id: ${{ secrets.GRAVITY_UI_APP_ID }}
2222
private-key: ${{ secrets.GRAVITY_UI_APP_PRIVATE_KEY }}
23-
- uses: gravity-ui/preview-deploy-action@v2
23+
- uses: gravity-ui/preview-deploy-action@v3
2424
with:
2525
project: uikit
2626
github-token: ${{ steps.generate-token.outputs.token }}

.github/workflows/pr-visual-tests-report.yml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ on:
88

99
jobs:
1010
comment:
11-
name: Create GitHub Comment
12-
if: github.event.workflow_run.event == 'pull_request'
11+
name: Deploy Report
12+
if: >
13+
github.event.workflow_run.event == 'pull_request' &&
14+
github.event.workflow_run.conclusion == 'success'
1315
runs-on: ubuntu-latest
1416
steps:
1517
- name: Generate token
@@ -18,32 +20,9 @@ jobs:
1820
with:
1921
app-id: ${{ secrets.GRAVITY_UI_APP_ID }}
2022
private-key: ${{ secrets.GRAVITY_UI_APP_PRIVATE_KEY }}
21-
- name: Download Artifacts
22-
uses: actions/download-artifact@v4
23+
- uses: gravity-ui/component-tests-deploy-action@v1
2324
with:
25+
project: uikit
2426
github-token: ${{ steps.generate-token.outputs.token }}
25-
run-id: ${{ github.event.workflow_run.id }}
26-
- name: Extract PR Number
27-
id: pr
28-
run: echo "::set-output name=id::$(<pr/pr-id.txt)"
29-
shell: bash
30-
- name: Install AWS CLI
31-
uses: unfor19/install-aws-cli-action@v1
32-
with:
33-
version: 2.22.35
34-
arch: amd64
35-
- name: Upload to S3
36-
env:
37-
AWS_ACCESS_KEY_ID: ${{ secrets.STORYBOOK_S3_KEY_ID }}
38-
AWS_SECRET_ACCESS_KEY: ${{ secrets.STORYBOOK_S3_SECRET_KEY }}
39-
AWS_DEFAULT_REGION: ru-central1
40-
AWS_EC2_METADATA_DISABLED: true
41-
run: aws s3 cp playwright-report s3://playwright-reports/uikit/pulls/${{ steps.pr.outputs.id}}/ --endpoint-url=https://storage.yandexcloud.net --recursive
42-
shell: bash
43-
- name: Create Comment
44-
uses: marocchino/sticky-pull-request-comment@v2
45-
with:
46-
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
47-
number: ${{ steps.pr.outputs.id }}
48-
header: visual tests report
49-
message: '[Visual Tests Report](https://storage.yandexcloud.net/playwright-reports/uikit/pulls/${{ steps.pr.outputs.id }}/index.html) is ready.'
27+
s3-key-id: ${{ secrets.STORYBOOK_S3_KEY_ID }}
28+
s3-secret-key: ${{ secrets.STORYBOOK_S3_SECRET_KEY }}

.github/workflows/pr-visual-tests.yml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,10 @@ jobs:
88
name: Visual Tests
99
runs-on: ubuntu-latest
1010
container:
11-
image: mcr.microsoft.com/playwright:v1.52.0-jammy
11+
image: mcr.microsoft.com/playwright:v1.56.0-jammy
1212
steps:
13-
- uses: actions/checkout@v4
14-
- uses: actions/setup-node@v4
13+
- uses: gravity-ui/component-tests-run-action@v1
1514
with:
16-
node-version: 20
17-
cache: npm
18-
- name: Install Packages
19-
run: npm ci
20-
- name: Run Visual Tests
21-
run: npm run playwright
22-
env:
23-
CI: 'true'
24-
- name: Upload Playwright Report
25-
if: always()
26-
uses: actions/upload-artifact@v4
27-
with:
28-
name: playwright-report
29-
path: ./playwright/report
30-
retention-days: 1
31-
- name: Save PR ID
32-
if: always()
33-
run: |
34-
pr="${{ github.event.pull_request.number }}"
35-
echo $pr > ./pr-id.txt
36-
shell: bash
37-
- name: Create PR Artifact
38-
if: always()
39-
uses: actions/upload-artifact@v4
40-
with:
41-
name: pr
42-
path: ./pr-id.txt
15+
command: npm run playwright
16+
report-path: ./playwright/report
17+
node-version-file: '.nvmrc'

0 commit comments

Comments
 (0)