From 0839be497c17439d21903b5e4df6a141d6f00f64 Mon Sep 17 00:00:00 2001 From: Anna Antipova Date: Thu, 29 Jul 2021 17:11:43 +0300 Subject: [PATCH 1/4] #498 remove e2e-checks as submodule from backend workflow --- .github/workflows/backend.yml | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index ae5757ce6f..5df7b74bc0 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -4,7 +4,6 @@ on: types: ['opened', 'edited', 'reopened', 'synchronize'] paths: - 'kafka-ui-api/**' - - 'kafka-ui-e2e-checks/**' jobs: build: runs-on: ubuntu-latest @@ -17,14 +16,6 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - uses: actions/checkout@v2 - - name: Set the values - id: step_one - run: | - cat "./kafka-ui-e2e-checks/.env.ci" >> "./kafka-ui-e2e-checks/.env" - - name: pull docker - id: step_four - run: | - docker pull selenoid/vnc:chrome_86.0 - name: compose app id: step_five run: | @@ -44,29 +35,3 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar - - name: Generate allure report - uses: simple-elf/allure-report-action@master - if: always() - id: allure-report - with: - allure_results: ./kafka-ui-e2e-checks/allure-results - gh_pages: allure-results - allure_report: allure-report - subfolder: allure-results - - name: Deploy allure report to Github Pages - if: always() - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: allure-history - publish_branch: gh-pages - destination_dir: ./allure - - name: Post the link to allure report - if: always() - uses: Sibz/github-status-action@v1 - with: - authToken: ${{secrets.GITHUB_TOKEN}} - context: 'Test report' - state: 'success' - sha: ${{ github.event.pull_request.head.sha || github.sha }} - target_url: https://${{ github.repository_owner }}.github.io/kafka-ui/allure/allure-results/${{ github.run_number }} \ No newline at end of file From 02462a4497b5ca550f9f88fd08e2482e89fb1f81 Mon Sep 17 00:00:00 2001 From: Anna Antipova Date: Thu, 29 Jul 2021 17:13:19 +0300 Subject: [PATCH 2/4] #498 add separate GitHub workflow for running checks --- .github/workflows/e2e-checks.yaml | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/e2e-checks.yaml diff --git a/.github/workflows/e2e-checks.yaml b/.github/workflows/e2e-checks.yaml new file mode 100644 index 0000000000..7642e334cc --- /dev/null +++ b/.github/workflows/e2e-checks.yaml @@ -0,0 +1,65 @@ +name: e2e-checks +on: + pull_request: + types: ['opened', 'edited', 'reopened', 'synchronize'] + paths: + - 'kafka-ui-e2e-checks/**' +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - uses: actions/checkout@v2 + - name: Set the values + id: step_one + run: | + cat "./kafka-ui-e2e-checks/.env.ci" >> "./kafka-ui-e2e-checks/.env" + - name: pull docker + id: step_four + run: | + docker pull selenoid/vnc:chrome_86.0 + - name: compose app + id: step_five + run: | + docker-compose -f ./docker/kafka-ui.yaml up -d + - name: Set up JDK 1.13 + uses: actions/setup-java@v1 + with: + java-version: 1.13 + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar + - name: Generate allure report + uses: simple-elf/allure-report-action@master + if: always() + id: allure-report + with: + allure_results: ./kafka-ui-e2e-checks/allure-results + gh_pages: allure-results + allure_report: allure-report + subfolder: allure-results + - name: Deploy allure report to Github Pages + if: always() + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: allure-history + publish_branch: gh-pages + destination_dir: ./allure + - name: Post the link to allure report + if: always() + uses: Sibz/github-status-action@v1 + with: + authToken: ${{secrets.GITHUB_TOKEN}} + context: 'Test report' + state: 'success' + sha: ${{ github.event.pull_request.head.sha || github.sha }} + target_url: https://${{ github.repository_owner }}.github.io/kafka-ui/allure/allure-results/${{ github.run_number }} \ No newline at end of file From 686a319678ff25adb9f8fed756b5e53ad5c1b06d Mon Sep 17 00:00:00 2001 From: Anna Antipova Date: Fri, 30 Jul 2021 12:38:46 +0300 Subject: [PATCH 3/4] #498 add backend and frontend paths for e2e tests triggering --- .github/workflows/e2e-checks.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/e2e-checks.yaml b/.github/workflows/e2e-checks.yaml index 7642e334cc..6622c0908a 100644 --- a/.github/workflows/e2e-checks.yaml +++ b/.github/workflows/e2e-checks.yaml @@ -3,6 +3,9 @@ on: pull_request: types: ['opened', 'edited', 'reopened', 'synchronize'] paths: + - 'kafka-ui-api/**' + - 'kafka-ui-contract/**' + - 'kafka-ui-react-app/**' - 'kafka-ui-e2e-checks/**' jobs: build: From c8a66f7b03349b906312e13bfc88fadb978a480f Mon Sep 17 00:00:00 2001 From: Anna Antipova Date: Fri, 30 Jul 2021 15:30:26 +0300 Subject: [PATCH 4/4] 498: wait longer for testing purposes --- .../test/java/com/provectus/kafka/ui/extensions/WaitUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/extensions/WaitUtils.java b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/extensions/WaitUtils.java index f4d18c7977..5632ce72c2 100644 --- a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/extensions/WaitUtils.java +++ b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/extensions/WaitUtils.java @@ -25,7 +25,7 @@ public class WaitUtils { refresh(); i++; sleep(2000); - } while (!selectedValue.equals(element.getSelectedValue()) && i != 20); + } while (!selectedValue.equals(element.getSelectedValue()) && i != 30); Assertions.assertEquals(selectedValue, element.getSelectedValue()) ; } }