e2e-automation.yml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. name: "E2E: Automation suite"
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. test_suite:
  6. description: 'Select test suite to run'
  7. default: 'regression'
  8. required: true
  9. type: choice
  10. options:
  11. - regression
  12. - sanity
  13. - smoke
  14. qase_token:
  15. description: 'Set Qase token to enable integration'
  16. required: false
  17. type: string
  18. jobs:
  19. build-and-test:
  20. runs-on: ubuntu-latest
  21. steps:
  22. - uses: actions/checkout@v3
  23. with:
  24. ref: ${{ github.sha }}
  25. - name: Configure AWS credentials
  26. uses: aws-actions/configure-aws-credentials@v3
  27. with:
  28. aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
  29. aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
  30. aws-region: eu-central-1
  31. - name: Set up environment
  32. id: set_env_values
  33. run: |
  34. cat "./kafka-ui-e2e-checks/.env.ci" >> "./kafka-ui-e2e-checks/.env"
  35. - name: Pull with Docker
  36. id: pull_chrome
  37. run: |
  38. docker pull selenoid/vnc_chrome:103.0
  39. - name: Set up JDK
  40. uses: actions/setup-java@v3
  41. with:
  42. java-version: '17'
  43. distribution: 'zulu'
  44. cache: 'maven'
  45. - name: Build with Maven
  46. id: build_app
  47. run: |
  48. ./mvnw -B -ntp versions:set -DnewVersion=${{ github.sha }}
  49. ./mvnw -B -V -ntp clean install -Pprod -Dmaven.test.skip=true ${{ github.event.inputs.extraMavenOptions }}
  50. - name: Compose with Docker
  51. id: compose_app
  52. # use the following command until #819 will be fixed
  53. run: |
  54. docker-compose -f kafka-ui-e2e-checks/docker/selenoid-git.yaml up -d
  55. docker-compose -f ./documentation/compose/e2e-tests.yaml up -d
  56. - name: Run test suite
  57. run: |
  58. ./mvnw -B -ntp versions:set -DnewVersion=${{ github.sha }}
  59. ./mvnw -B -V -ntp -DQASEIO_API_TOKEN=${{ github.event.inputs.qase_token }} -Dsurefire.suiteXmlFiles='src/test/resources/${{ github.event.inputs.test_suite }}.xml' -Dsuite=${{ github.event.inputs.test_suite }} -f 'kafka-ui-e2e-checks' test -Pprod
  60. - name: Generate Allure report
  61. uses: simple-elf/allure-report-action@master
  62. if: always()
  63. id: allure-report
  64. with:
  65. allure_results: ./kafka-ui-e2e-checks/allure-results
  66. gh_pages: allure-results
  67. allure_report: allure-report
  68. subfolder: allure-results
  69. report_url: "http://kafkaui-allure-reports.s3-website.eu-central-1.amazonaws.com"
  70. - uses: jakejarvis/s3-sync-action@master
  71. if: always()
  72. env:
  73. AWS_S3_BUCKET: 'kafkaui-allure-reports'
  74. AWS_REGION: 'eu-central-1'
  75. SOURCE_DIR: 'allure-history/allure-results'
  76. - name: Deploy report to Amazon S3
  77. if: always()
  78. uses: Sibz/github-status-action@v1.1.6
  79. with:
  80. authToken: ${{secrets.GITHUB_TOKEN}}
  81. context: "Click Details button to open Allure report"
  82. state: "success"
  83. sha: ${{ github.sha }}
  84. target_url: http://kafkaui-allure-reports.s3-website.eu-central-1.amazonaws.com/${{ github.run_number }}
  85. - name: Dump Docker logs on failure
  86. if: failure()
  87. uses: jwalton/gh-docker-logs@v2.2.1