-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: add visual tests infra #1047
Merged
+641
−4
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
51510f5
chore(TestComponent): made a new kind of component testing
NasgulNexus 939da08
fix: ci
NasgulNexus 618723e
fix: ci
NasgulNexus 959179f
fix: ci
NasgulNexus 4513a35
fix: ci
NasgulNexus 1e8e4fe
fix: test ci
NasgulNexus b15aa1d
fix: ci
NasgulNexus dc467cb
fix: add to gitignore test-results
NasgulNexus 4d51053
fix: snapshots
NasgulNexus 604ff87
fix: ci
NasgulNexus d2b3d9d
fix: upload reports
NasgulNexus 5929f42
fix: retries 0
NasgulNexus 360212a
fix: test styles
NasgulNexus 425b89e
fix: config
NasgulNexus 18d1c9f
fix: test channel
NasgulNexus bc84b37
fix: delete channel
NasgulNexus fbb9110
fix: add upload test-result
NasgulNexus 5d8bb87
fix: add docker
NasgulNexus a6d90e3
fix: delete test
NasgulNexus 5877113
fix: change ci
NasgulNexus f55102f
fix: add always
NasgulNexus a6ba436
fix: add always
NasgulNexus 9abae19
fix: delete container
NasgulNexus e2202be
fix: test aws
NasgulNexus aae8b1b
fix: test commit
NasgulNexus bbc692d
fix: docs
NasgulNexus c7c9b3b
fix: folder tests
NasgulNexus 6c58de1
fix: ci
NasgulNexus 485ed8a
fix: fix broken test
NasgulNexus e8b903c
fix: test tests
NasgulNexus ce44594
fix: rebase
NasgulNexus 16c956a
fix: test ci if
NasgulNexus 735383b
fix: correct remarks
NasgulNexus aa02617
fix: fix docs
NasgulNexus 9d7d11a
fix: commit ci cd
NasgulNexus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Playwright Tests | ||
|
||
on: | ||
# push: | ||
# branches: [main, next] | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Test component | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: npm run playwright | ||
env: | ||
CI: 'true' | ||
- name: Upload Playwright playwright report to GitHub Actions Artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: playwright-report | ||
path: playwright-report | ||
retention-days: 1 | ||
- name: Upload Playwright report | ||
if: always() | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.STORYBOOK_S3_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.STORYBOOK_S3_SECRET_KEY }} | ||
AWS_DEFAULT_REGION: ru-central1 | ||
AWS_EC2_METADATA_DISABLED: true | ||
run: aws s3 cp ./playwright-report s3://playwright-reports/uikit/pulls/${{ github.event.pull_request.number }}/ --endpoint-url=https://storage.yandexcloud.net --recursive | ||
shell: bash | ||
- name: Create Comment | ||
if: always() | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }} | ||
number: ${{ github.event.pull_request.number }} | ||
header: playwright test | ||
message: '[Playwright Test Component](https://storage.yandexcloud.net/playwright-reports/uikit/pulls/${{ github.event.pull_request.number }}/index.html) is ready.' | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ node_modules | |
/build | ||
/styles/**/*.css | ||
/coverage | ||
/playwright/playwright/.cache | ||
/playwright-report | ||
/test-results |
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it so that the report was always shown and during development it was clear whether new tests appeared or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean isnt's
if: always()
equal to not specifingif
statement at all?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/gravity-ui/uikit/actions/runs/6888720871/job/18738258388#step:6:4712 tested without if it doesn't work.
because the test crashes and then does not perform other tasks. Without if he will do it only when everything went well