|
@@ -0,0 +1,70 @@
|
|
|
+name: E2E Automation suite
|
|
|
+on:
|
|
|
+ schedule:
|
|
|
+ - cron: '0 0 * * 1'
|
|
|
+
|
|
|
+jobs:
|
|
|
+ build-and-test:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v3
|
|
|
+ with:
|
|
|
+ ref: ${{ github.event.pull_request.head.sha }}
|
|
|
+ - name: Set up environment
|
|
|
+ id: set_env_values
|
|
|
+ run: |
|
|
|
+ cat "./kafka-ui-e2e-checks/.env.ci" >> "./kafka-ui-e2e-checks/.env"
|
|
|
+ - name: Pull with Docker
|
|
|
+ id: pull_chrome
|
|
|
+ run: |
|
|
|
+ docker pull selenium/standalone-chrome:103.0
|
|
|
+ - name: Set up JDK
|
|
|
+ uses: actions/setup-java@v3
|
|
|
+ with:
|
|
|
+ java-version: '17'
|
|
|
+ distribution: 'zulu'
|
|
|
+ cache: 'maven'
|
|
|
+ - name: Build with Maven
|
|
|
+ id: build_app
|
|
|
+ run: |
|
|
|
+ ./mvnw -B -ntp versions:set -DnewVersion=${{ github.event.pull_request.head.sha }}
|
|
|
+ ./mvnw -B -V -ntp clean install -Pprod -Dmaven.test.skip=true ${{ github.event.inputs.extraMavenOptions }}
|
|
|
+ - name: Compose with Docker
|
|
|
+ id: compose_app
|
|
|
+ # use the following command until #819 will be fixed
|
|
|
+ run: |
|
|
|
+ docker-compose -f ./documentation/compose/e2e-tests.yaml up -d
|
|
|
+ - name: Run test suite
|
|
|
+ run: |
|
|
|
+ ./mvnw -B -ntp versions:set -DnewVersion=${{ github.event.pull_request.head.sha }}
|
|
|
+ ./mvnw -B -V -ntp -DQASEIO_API_TOKEN=${{ secrets.QASEIO_API_TOKEN }} -Dsurefire.suiteXmlFiles='src/test/resources/regression.xml' -Dsuite=regression -Dqase=true -f 'kafka-ui-e2e-checks' test -Pprod
|
|
|
+ - 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
|
|
|
+ report_url: "http://kafkaui-allure-reports.s3-website.eu-central-1.amazonaws.com"
|
|
|
+ - uses: jakejarvis/s3-sync-action@master
|
|
|
+ if: always()
|
|
|
+ env:
|
|
|
+ AWS_S3_BUCKET: 'kafkaui-allure-reports'
|
|
|
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
|
+ AWS_REGION: 'eu-central-1'
|
|
|
+ SOURCE_DIR: 'allure-history/allure-results'
|
|
|
+ - name: Deploy report to Amazon S3
|
|
|
+ if: always()
|
|
|
+ uses: Sibz/github-status-action@v1.1.6
|
|
|
+ with:
|
|
|
+ authToken: ${{secrets.GITHUB_TOKEN}}
|
|
|
+ context: "Click Details button to open Allure report"
|
|
|
+ state: "success"
|
|
|
+ sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
|
+ target_url: http://kafkaui-allure-reports.s3-website.eu-central-1.amazonaws.com/${{ github.run_number }}
|
|
|
+ - name: Dump Docker logs on failure
|
|
|
+ if: failure()
|
|
|
+ uses: jwalton/gh-docker-logs@v2.2.1
|