-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
132 additions
and
119 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,20 @@ | ||
name: 'Branch test' | ||
|
||
run-name: Test ${{ github.ref_name }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- '*-stable' | ||
|
||
concurrency: | ||
group: test-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
uses: ./.github/workflows/workflow_test.yml | ||
|
||
test_e2e: | ||
uses: ./.github/workflows/workflow_test_e2e.yml |
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
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,39 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
description: 'The branch, tag or SHA to checkout' | ||
default: ${{ github.ref }} | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'yarn' | ||
- run: yarn install --frozen-lockfile --ignore-scripts | ||
|
||
- name: Run tests | ||
run: yarn run test:ci | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
flags: unittests | ||
files: .nyc_output/coverage-final.json | ||
|
||
- name: Upload test artifact | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: test-output | ||
path: | | ||
lint-results.json | ||
test-results.json |
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,65 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
description: 'The branch, tag or SHA to checkout' | ||
default: ${{ github.ref }} | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
test_e2e: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
appearance: [dark, light] | ||
browser: [chromium, firefox, webkit] | ||
platform: [android, ios, vkcom] | ||
exclude: | ||
- platform: android | ||
browser: firefox | ||
- platform: android | ||
browser: webkit | ||
- platform: ios | ||
browser: firefox | ||
- platform: ios | ||
browser: chromium | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
ref: ${{ inputs.ref }} | ||
- name: Checkout LFS objects | ||
run: git lfs checkout | ||
- name: Checkout base snapshots | ||
run: git fetch --no-tags --depth=1 origin $GITHUB_BASE_REF && git checkout origin/$GITHUB_BASE_REF packages/vkui/src/**/__image_snapshots__/*.png | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'yarn' | ||
- run: yarn install --frozen-lockfile --ignore-scripts | ||
- name: Install deps for playwright | ||
run: yarn run playwright:install ${{ matrix.browser }} | ||
- name: FYI visual tests | ||
run: yarn run test:e2e:ci | ||
env: | ||
APPEARANCE: ${{ matrix.appearance }} | ||
BROWSER: ${{ matrix.browser }} | ||
PLATFORM: ${{ matrix.platform }} | ||
continue-on-error: true | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
flags: e2e-${{ matrix.browser }}-${{ matrix.platform }}-${{ matrix.appearance }} | ||
files: .nyc_output/coverage.json | ||
|
||
- name: Upload test artifact | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: e2e-output | ||
path: | | ||
__diff_output__/ | ||
e2e-results.json |