fix(NativeSelect): apply selectType to FormField #1754
Workflow file for this run
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
name: 'Pull Request / Packages' | |
# > Про 'pull_request_target' и про риски его использования можно ознакомиться в статье по ссылке ниже | |
# > https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | |
# | |
# При 'pull_request_target' свойство `github.ref` будет соответствовать `refs/head/master`, поэтому необходимо | |
# вручную перебивать его на `github.event.pull_request.number` там, где это необходимо. | |
# | |
# Пример: | |
# ``` | |
# - uses: actions/checkout@v3 | |
# with: | |
# ref: refs/pull/${{ github.event.pull_request.number }}/merge | |
# ``` | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened, ready_for_review] | |
paths-ignore: | |
- 'tools/swc-transform-css-modules/**' | |
- '!tools/swc-transform-css-modules/swc_transform_css_modules.wasm' | |
- '.husky/**' | |
- '.codesandbox/**' | |
- '.github/**' | |
- '!.github/actions/**' | |
- '.github/actions/**/*.yml' | |
- '**/*.md' | |
- '!packages/vkui/src/**/*.md' | |
- '!styleguide/pages/**/*.md' | |
- '**/__image_snapshots__/*.png' | |
concurrency: | |
group: pr-packages-${{ github.event.pull_request.number }} | |
cancel-in-progress: true | |
jobs: | |
changed_files: | |
runs-on: ubuntu-latest | |
name: Detect what files changed | |
outputs: | |
package_vkui: ${{ steps.changes.outputs.package_vkui }} | |
docs_styleguide: ${{ steps.changes.outputs.docs_styleguide }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/pull/${{ github.event.pull_request.number }}/merge | |
- name: Find changes | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }} | |
filters: .github/file-filters.yml | |
linters: | |
runs-on: ubuntu-latest | |
name: Run linters | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/pull/${{ github.event.pull_request.number }}/merge | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile --ignore-scripts | |
- name: Run Stylelint | |
run: yarn run lint:style | |
- name: Run types checking | |
run: yarn run lint:types | |
- name: Run ESLint | |
run: yarn run lint:es:ci | |
- name: Check if the generated files have been updated | |
run: yarn run lint:generated-files | |
- name: Upload lint scripts artifact | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: lint-scripts-output | |
path: lint-results.json | |
test: | |
name: Call reusable unit tests workflow | |
uses: ./.github/workflows/reusable_workflow_test.yml | |
with: | |
ref: refs/pull/${{ github.event.pull_request.number }}/merge | |
test_e2e: | |
if: ${{ needs.changed_files.outputs.package_vkui == 'true' }} | |
needs: changed_files | |
name: Call reusable e2e tests workflow | |
uses: ./.github/workflows/reusable_workflow_test_e2e.yml | |
with: | |
ref: refs/pull/${{ github.event.pull_request.number }}/merge | |
analyze_bundle_size: | |
if: ${{ needs.changed_files.outputs.package_vkui == 'true' }} | |
needs: changed_files | |
runs-on: ubuntu-latest | |
name: Analyze bundle size | |
env: | |
CI_JOB_NUMBER: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/pull/${{ github.event.pull_request.number }}/merge | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile --ignore-scripts | |
- uses: andresz1/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
# only affects current branch | |
skip_step: install | |
directory: packages/vkui/ | |
# В 1.7.0 пока нет этого свойства. См. packages/vkui/yarn.lock | |
# package_manager: yarn | |
build_script: 'size:ci' | |
report_ci: | |
if: ${{ always() }} | |
needs: | |
- changed_files | |
- linters | |
- test | |
- test_e2e | |
runs-on: ubuntu-latest | |
name: Report CI results | |
steps: | |
- name: Download lint scripts artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: lint-scripts-output | |
- name: Download test artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: test-output | |
- name: Download Playwright Report artifact | |
# см. [Примечание 1] | |
if: ${{ needs.changed_files.outputs.package_vkui == 'true' }} | |
uses: actions/download-artifact@v3 | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
- name: Upload Playwright Report | |
if: ${{ needs.changed_files.outputs.package_vkui == 'true' }} | |
uses: VKCOM/gh-actions/VKUI/s3@main | |
with: | |
awsAccessKeyId: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
awsSecretAccessKey: ${{ secrets.AWS_SECRET_KEY }} | |
awsBucket: vkui-screenshot | |
awsEndpoint: https://hb.bizmrg.com | |
command: upload | |
commandUploadSrc: playwright-report/ | |
commandUploadDist: pull/${{ github.event.pull_request.number }}/${{ github.event.pull_request.head.sha }}/playwright-report | |
- name: Push reports (with Playwright Report comment) | |
if: ${{ needs.changed_files.outputs.package_vkui == 'true' }} | |
uses: VKCOM/gh-actions/VKUI/reporter@main | |
with: | |
playwrightReportURL: https://vkui-screenshot.hb.bizmrg.com/pull/${{ github.event.pull_request.number }}/${{ github.event.pull_request.head.sha }}/playwright-report/index.html | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push reports (without Playwright Report comment) | |
if: ${{ needs.changed_files.outputs.package_vkui == 'false' }} | |
uses: VKCOM/gh-actions/VKUI/reporter@main | |
styleguide: | |
if: ${{ needs.changed_files.outputs.docs_styleguide == 'true' }} | |
needs: changed_files | |
runs-on: ubuntu-latest | |
name: Deploy docs (styleguide) | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/pull/${{ github.event.pull_request.number }}/merge | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile --ignore-scripts | |
- name: Build styleguide | |
run: yarn run docs:styleguide:build | |
- name: Upload styleguide S3 | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
uses: VKCOM/gh-actions/VKUI/s3@main | |
with: | |
awsAccessKeyId: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
awsSecretAccessKey: ${{ secrets.AWS_SECRET_KEY }} | |
awsBucket: vkui-screenshot | |
awsEndpoint: https://hb.bizmrg.com | |
command: upload | |
commandUploadSrc: styleguide/dist/ | |
commandUploadDist: pull/${{ github.event.pull_request.number }}/${{ github.event.pull_request.head.sha }}/styleguide | |
storybook: | |
if: ${{ needs.changed_files.outputs.docs_styleguide == 'true' }} | |
needs: changed_files | |
runs-on: ubuntu-latest | |
name: Deploy docs (storybook) | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/pull/${{ github.event.pull_request.number }}/merge | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile --ignore-scripts | |
- name: Build storybook | |
run: yarn docs:storybook:build | |
- name: Upload storybook S3 | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
uses: VKCOM/gh-actions/VKUI/s3@main | |
with: | |
awsAccessKeyId: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
awsSecretAccessKey: ${{ secrets.AWS_SECRET_KEY }} | |
awsBucket: vkui-screenshot | |
awsEndpoint: https://hb.bizmrg.com | |
command: upload | |
commandUploadSrc: packages/vkui/storybook-static | |
commandUploadDist: pull/${{ github.event.pull_request.number }}/${{ github.event.pull_request.head.sha }}/storybook | |
docs_comment: | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
needs: | |
- storybook | |
- styleguide | |
runs-on: ubuntu-latest | |
name: Docs comment | |
steps: | |
- name: Find storybook URL comment | |
uses: peter-evans/find-comment@v2 | |
id: find_url_comment | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: <!-- storybook_url --> | |
- name: Create or update comment | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
comment-id: ${{ steps.find_url_comment.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
<!-- storybook_url --> | |
## 👀 Docs deployed | |
- [Styleguide](https://vkui-screenshot.hb.bizmrg.com/pull/${{ github.event.pull_request.number }}/${{ github.event.pull_request.head.sha }}/styleguide/index.html) | |
- [Storybook](https://vkui-screenshot.hb.bizmrg.com/pull/${{ github.event.pull_request.number }}/${{ github.event.pull_request.head.sha }}/storybook/index.html) | |
Commit ${{ github.event.pull_request.head.sha }} | |
edit-mode: replace |