Skip to content

Commit

Permalink
CI: update testcafe tests for extracted e2e project in devextreme 24.1 (
Browse files Browse the repository at this point in the history
#127)

* CI: update testcafe tests for extracted e2e project in devextreme 24.1

* Get rid of license message

* Add dist-tag 24_2

---------

Co-authored-by: Alexander Bulychev <git@bulychev.net>
  • Loading branch information
iBat and Alexander Bulychev authored Jun 19, 2024
1 parent 1a313c0 commit 82a4c1d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 18 deletions.
14 changes: 8 additions & 6 deletions .github/actions/html-editor/common/prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
description: DevExtreme checkout directory
required: true
default: devextreme-repo
devextreme-package-directory:
description: DevExtreme package path
default: devextreme-repo
node-version:
description: Node.js version
required: true
Expand All @@ -16,19 +19,19 @@ runs:
using: composite
steps:
- name: Checkout DevExtreme branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: devexpress/devextreme
ref: ${{ inputs.branch }}
path: ${{ inputs.working-directory }}

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}

- name: Restore npm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -43,15 +46,14 @@ runs:
uses: actions/download-artifact@v3
with:
name: quill-package
path: ${{ inputs.working-directory }}
path: ${{ inputs.devextreme-package-directory }}

- name: Install quill ci package
shell: bash
working-directory: ${{ inputs.working-directory }}
working-directory: ${{ inputs.devextreme-package-directory }}
run: npm install devextreme-quill-0.0.0-ci.tgz

- name: Install cross-env globally
shell: bash
working-directory: ${{ inputs.working-directory }}
run: npm install --global cross-env

5 changes: 2 additions & 3 deletions .github/actions/html-editor/steps/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ runs:
shell: bash
working-directory: ${{ inputs.devextreme-package-directory }}
env:
DEVEXTREME_TEST_CI: 'true'
BUILD_TEST_INTERNAL_PACKAGE: 'true'
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 'true'
BUILD_TESTCAFE: 'true'
run: npm run build:testcafe
run: npm run build

- name: Build:systemjs
if: ${{ !startsWith(inputs.branch, '22') }}
Expand Down
12 changes: 8 additions & 4 deletions .github/actions/html-editor/steps/testcafe-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ inputs:
description: DevExtreme package path
required: true
default: devextreme-repo
e2e-package-directory:
description: DevExtreme e2e package path
default: devextreme-repo
component-directory:
description: The component directory with Testcafe tests
required: true
Expand All @@ -26,6 +29,7 @@ runs:
with:
branch: ${{ inputs.branch }}
working-directory: ${{ inputs.working-directory }}
devextreme-package-directory: ${{ inputs.devextreme-package-directory }}

- name: Download artifact
uses: ./quill-repo/.github/actions/html-editor/common/get-artifact
Expand All @@ -48,24 +52,24 @@ runs:

- name: Run TestCafe tests
shell: bash
working-directory: ${{ inputs.devextreme-package-directory }}
working-directory: ${{ inputs.e2e-package-directory }}
run: |
all_args="--concurrency 2 --browsers=chrome:devextreme-shr2 --componentFolder ${{ inputs.component-directory }} --quarantineMode ${{ env.TEST_SUITE.quarantineMode}}"
echo "$all_args"
npm run test-testcafe -- $all_args
npm run test -- $all_args
- name: Copy compared screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: compared-screenshots
path: ${{ inputs.devextreme-package-directory }}/testing/testcafe/artifacts/compared-screenshots/**/*
path: ${{ inputs.e2e-package-directory }}/artifacts/compared-screenshots/**/*
if-no-files-found: ignore

- name: Copy failed test artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: failed-tests
path: ${{ inputs.devextreme-package-directory }}/testing/testcafe/artifacts/failedtests/**/*
path: ${{ inputs.e2e-package-directory }}/artifacts/failedtests/**/*
if-no-files-found: ignore
11 changes: 6 additions & 5 deletions .github/workflows/html-editor-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Quill repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build package
uses: ./.github/actions/quill/steps/build-package
Expand All @@ -44,7 +44,7 @@ jobs:
branch: ${{ fromJson(needs.set-up-branches.outputs.branches) }}
steps:
- name: Checkout Quill repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: quill-repo

Expand All @@ -66,7 +66,7 @@ jobs:
test-suite: [ui.htmlEditor]
steps:
- name: Checkout Quill repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: quill-repo

Expand All @@ -91,14 +91,15 @@ jobs:
]
steps:
- name: Checkout Quill repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: quill-repo

- name: Testcafe tests
uses: ./quill-repo/.github/actions/html-editor/steps/testcafe-tests
with:
branch: ${{ matrix.branch }}
devextreme-package-directory: ${{ 'devextreme-repo/packages/devextreme' }}
devextreme-package-directory: devextreme-repo/packages/devextreme
e2e-package-directory: devextreme-repo/e2e/testcafe-devextreme
component-directory: ${{ matrix.test-suite.componentFolder }}
quarantine-mode: ${{ matrix.test-suite.quarantineMode }}
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm dist-tag add devextreme-quill@${{ inputs.version }} 24_1
npm dist-tag add devextreme-quill@${{ inputs.version }} 24_2

0 comments on commit 82a4c1d

Please sign in to comment.