Skip to content

Commit

Permalink
Merge pull request #1 from Haarolean/vlad/develop
Browse files Browse the repository at this point in the history
Vlad/develop
  • Loading branch information
Haarolean authored Apr 11, 2024
2 parents 38c446d + e7cc100 commit 27f9b7b
Show file tree
Hide file tree
Showing 111 changed files with 1,417 additions and 1,951 deletions.
104 changes: 104 additions & 0 deletions .github/workflows/e2e-automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: "E2E: Automation suite"
on:
workflow_dispatch:
inputs:
test_suite:
description: 'Select test suite to run'
default: 'regression'
required: true
type: choice
options:
- regression
- sanity
- smoke

permissions:
contents: read

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v4
with:
token: ${{ github.token }}
ref: ${{ github.sha }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1

- name: Set up environment
id: set_env_values
run: |
cat "./e2e-tests/.env.ci" >> "./e2e-tests/.env"
- name: Pull with Docker
id: pull_chrome
run: |
docker pull selenoid/vnc_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.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 e2e-tests/docker/selenoid-git.yaml up -d
docker-compose -f ./documentation/compose/e2e-tests.yaml up -d
- name: Run test suite
run: |
./mvnw -B -ntp versions:set -DnewVersion=${{ github.sha }}
./mvnw -B -V -ntp -Dsurefire.suiteXmlFiles='src/test/resources/${{ github.event.inputs.test_suite }}.xml' -Dsuite=${{ github.event.inputs.test_suite }} -f 'e2e-tests' test -Pprod
- name: Generate Allure report
uses: simple-elf/allure-report-action@master
if: always()
id: allure-report
with:
allure_results: ./e2e-tests/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"

- name: Upload allure report to R2
uses: magicwallet/r2-upload@main
if: always()
with:
endpoint: ${{ secrets.R2_ENDPOINT }}
access_key_id: ${{ secrets.R2_ACCESS_KEY_ID }}
secret_access_key: ${{ secrets.R2_ACCESS_SECRET_KEY }}
bucket: ${{ secrets.R2_BUCKET }}
file: allure-history/allure-results
destination: '/'

- name: Add allure link status check
if: always()
uses: Sibz/[email protected]
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "Click Details button to view Allure report"
state: "success"
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/[email protected]
42 changes: 42 additions & 0 deletions .github/workflows/e2e-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "E2E: Manual suite"
on:
workflow_dispatch:
inputs:
test_suite:
description: 'Select test suite to run'
default: 'manual'
required: true
type: choice
options:
- manual

permissions:
contents: read

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ github.token }}
ref: ${{ github.sha }}
- name: Set up environment
id: set_env_values
run: |
cat "./e2e-tests/.env.ci" >> "./e2e-tests/.env"
- 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.sha }}
./mvnw -B -V -ntp clean install -Pprod -Dmaven.test.skip=true ${{ github.event.inputs.extraMavenOptions }}
- name: Run test suite
run: |
./mvnw -B -ntp versions:set -DnewVersion=${{ github.sha }}
./mvnw -B -V -ntp -Dsurefire.suiteXmlFiles='src/test/resources/${{ github.event.inputs.test_suite }}.xml' -Dsuite=${{ github.event.inputs.test_suite }} -f 'e2e-tests' test -Pprod
99 changes: 99 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: "E2E: PR healthcheck"
on:
pull_request_target:
types: [ "opened", "reopened", "synchronize" ]
paths:
- "pom.xml"
- "contract/**"
- "api/**"
- "serde-api/**"
- "frontend/**"
- "e2e-tests/**"

permissions:
contents: read
statuses: write

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v4
with:
token: ${{ github.token }}
ref: ${{ github.event.pull_request.head.sha }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.S3_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.S3_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1

- name: Set up environment
id: set_env_values
run: |
cat "./e2e-tests/.env.ci" >> "./e2e-tests/.env"
- name: Pull with Docker
id: pull_chrome
run: |
docker pull selenoid/vnc_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 e2e-tests/docker/selenoid-git.yaml up -d
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 -Dsurefire.suiteXmlFiles='src/test/resources/smoke.xml' -f 'e2e-tests' test -Pprod
- name: Generate allure report
uses: simple-elf/allure-report-action@master
if: always()
id: allure-report
with:
allure_results: ./e2e-tests/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_REGION: 'eu-central-1'
SOURCE_DIR: 'allure-history/allure-results'

- name: Deploy report to Amazon S3
if: always()
uses: Sibz/[email protected]
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/[email protected]
91 changes: 91 additions & 0 deletions .github/workflows/e2e-weekly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: "E2E: Weekly suite"
on:
schedule:
- cron: '0 1 * * 1'

permissions:
contents: read

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v4
with:
token: ${{ github.token }}
ref: ${{ github.sha }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1

- name: Set up environment
id: set_env_values
run: |
cat "./e2e-tests/.env.ci" >> "./e2e-tests/.env"
- name: Pull with Docker
id: pull_chrome
run: |
docker pull selenoid/vnc_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.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 e2e-tests/docker/selenoid-git.yaml up -d
docker-compose -f ./documentation/compose/e2e-tests.yaml up -d
- name: Run test suite
run: |
./mvnw -B -ntp versions:set -DnewVersion=${{ github.sha }}
./mvnw -B -V -ntp -Dsurefire.suiteXmlFiles='src/test/resources/sanity.xml' -Dsuite=weekly -f 'e2e-tests' test -Pprod
- name: Generate Allure report
uses: simple-elf/allure-report-action@master
if: always()
id: allure-report
with:
allure_results: ./e2e-tests/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_REGION: 'eu-central-1'
SOURCE_DIR: 'allure-history/allure-results'

- name: Deploy report to Amazon S3
if: always()
uses: Sibz/[email protected]
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "Click Details button to open Allure report"
state: "success"
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/[email protected]
3 changes: 0 additions & 3 deletions e2e-tests/.env.ci

This file was deleted.

3 changes: 0 additions & 3 deletions e2e-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
.env
build/
allure-results/
selenoid/video/
target/
selenoid/logs/
Loading

0 comments on commit 27f9b7b

Please sign in to comment.