Skip to content

Commit 8c5c5c1

Browse files
committed
Revert "Infra: Disable e2e tests for now"
This reverts commit ef3e7f1.
1 parent 2a676f0 commit 8c5c5c1

File tree

4 files changed

+305
-0
lines changed

4 files changed

+305
-0
lines changed

.github/workflows/e2e-automation.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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+
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
build-and-test:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
token: ${{ github.token }}
29+
ref: ${{ github.sha }}
30+
- name: Configure AWS credentials
31+
uses: aws-actions/configure-aws-credentials@v4
32+
with:
33+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
34+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
35+
aws-region: eu-central-1
36+
- name: Set up environment
37+
id: set_env_values
38+
run: |
39+
cat "./e2e-tests/.env.ci" >> "./e2e-tests/.env"
40+
- name: Pull with Docker
41+
id: pull_chrome
42+
run: |
43+
docker pull selenoid/vnc_chrome:103.0
44+
- name: Set up JDK
45+
uses: actions/setup-java@v3
46+
with:
47+
java-version: '17'
48+
distribution: 'zulu'
49+
cache: 'maven'
50+
- name: Build with Maven
51+
id: build_app
52+
run: |
53+
./mvnw -B -ntp versions:set -DnewVersion=${{ github.sha }}
54+
./mvnw -B -V -ntp clean install -Pprod -Dmaven.test.skip=true ${{ github.event.inputs.extraMavenOptions }}
55+
- name: Compose with Docker
56+
id: compose_app
57+
# use the following command until #819 will be fixed
58+
run: |
59+
docker-compose -f e2e-tests/docker/selenoid-git.yaml up -d
60+
docker-compose -f ./documentation/compose/e2e-tests.yaml up -d
61+
- name: Run test suite
62+
run: |
63+
./mvnw -B -ntp versions:set -DnewVersion=${{ github.sha }}
64+
./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 'e2e-tests' test -Pprod
65+
- name: Generate Allure report
66+
uses: simple-elf/allure-report-action@master
67+
if: always()
68+
id: allure-report
69+
with:
70+
allure_results: ./e2e-tests/allure-results
71+
gh_pages: allure-results
72+
allure_report: allure-report
73+
subfolder: allure-results
74+
report_url: "http://kafkaui-allure-reports.s3-website.eu-central-1.amazonaws.com"
75+
- uses: jakejarvis/s3-sync-action@master
76+
if: always()
77+
env:
78+
AWS_S3_BUCKET: 'kafkaui-allure-reports'
79+
AWS_REGION: 'eu-central-1'
80+
SOURCE_DIR: 'allure-history/allure-results'
81+
- name: Deploy report to Amazon S3
82+
if: always()
83+
uses: Sibz/github-status-action@v1.1.6
84+
with:
85+
authToken: ${{secrets.GITHUB_TOKEN}}
86+
context: "Click Details button to open Allure report"
87+
state: "success"
88+
sha: ${{ github.sha }}
89+
target_url: http://kafkaui-allure-reports.s3-website.eu-central-1.amazonaws.com/${{ github.run_number }}
90+
- name: Dump Docker logs on failure
91+
if: failure()
92+
uses: jwalton/gh-docker-logs@v2.2.2

.github/workflows/e2e-manual.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "E2E: Manual suite"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
test_suite:
6+
description: 'Select test suite to run'
7+
default: 'manual'
8+
required: true
9+
type: choice
10+
options:
11+
- manual
12+
- qase
13+
qase_token:
14+
description: 'Set Qase token to enable integration'
15+
required: true
16+
type: string
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
build-and-test:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
token: ${{ github.token }}
28+
ref: ${{ github.sha }}
29+
- name: Set up environment
30+
id: set_env_values
31+
run: |
32+
cat "./e2e-tests/.env.ci" >> "./e2e-tests/.env"
33+
- name: Set up JDK
34+
uses: actions/setup-java@v3
35+
with:
36+
java-version: '17'
37+
distribution: 'zulu'
38+
cache: 'maven'
39+
- name: Build with Maven
40+
id: build_app
41+
run: |
42+
./mvnw -B -ntp versions:set -DnewVersion=${{ github.sha }}
43+
./mvnw -B -V -ntp clean install -Pprod -Dmaven.test.skip=true ${{ github.event.inputs.extraMavenOptions }}
44+
- name: Run test suite
45+
run: |
46+
./mvnw -B -ntp versions:set -DnewVersion=${{ github.sha }}
47+
./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 'e2e-tests' test -Pprod

.github/workflows/e2e-tests.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: "E2E: PR healthcheck"
2+
on:
3+
pull_request_target:
4+
types: [ "opened", "reopened", "synchronize" ]
5+
paths:
6+
- "pom.xml"
7+
- "contract/**"
8+
- "api/**"
9+
- "serde-api/**"
10+
- "frontend/**"
11+
- "e2e-tests/**"
12+
13+
permissions:
14+
contents: read
15+
statuses: write
16+
17+
jobs:
18+
build-and-test:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
token: ${{ github.token }}
24+
ref: ${{ github.event.pull_request.head.sha }}
25+
- name: Configure AWS credentials
26+
uses: aws-actions/configure-aws-credentials@v4
27+
with:
28+
aws-access-key-id: ${{ secrets.S3_AWS_ACCESS_KEY_ID }}
29+
aws-secret-access-key: ${{ secrets.S3_AWS_SECRET_ACCESS_KEY }}
30+
aws-region: eu-central-1
31+
- name: Set up environment
32+
id: set_env_values
33+
run: |
34+
cat "./e2e-tests/.env.ci" >> "./e2e-tests/.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.event.pull_request.head.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 e2e-tests/docker/selenoid-git.yaml up -d
55+
docker-compose -f ./documentation/compose/e2e-tests.yaml up -d && until [ "$(docker exec kafbat-ui wget --spider --server-response http://localhost:8080/actuator/health 2>&1 | grep -c 'HTTP/1.1 200 OK')" == "1" ]; do echo "Waiting for kafka-ui ..." && sleep 1; done
56+
- name: Run test suite
57+
run: |
58+
./mvnw -B -ntp versions:set -DnewVersion=${{ github.event.pull_request.head.sha }}
59+
./mvnw -B -V -ntp -Dsurefire.suiteXmlFiles='src/test/resources/smoke.xml' -f 'e2e-tests' 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: ./e2e-tests/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.event.pull_request.head.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.2

.github/workflows/e2e-weekly.yml

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

0 commit comments

Comments
 (0)