From 05ba15c33ea315f68465f0fa907160d271dec969 Mon Sep 17 00:00:00 2001 From: SSpirits Date: Wed, 3 Jan 2024 17:35:50 +0800 Subject: [PATCH 01/10] ci(stream): add e2e ci Signed-off-by: SSpirits --- .github/workflows/s3-stream-e2e.yml | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/s3-stream-e2e.yml diff --git a/.github/workflows/s3-stream-e2e.yml b/.github/workflows/s3-stream-e2e.yml new file mode 100644 index 000000000..5eb20498b --- /dev/null +++ b/.github/workflows/s3-stream-e2e.yml @@ -0,0 +1,42 @@ +name: E2E-TEST for AutoMQ S3Stream +on: + pull_request: + types: + - opened + - reopened + - synchronize + paths: + - 's3stream/**' +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Build s3stream dependency + run: cd s3stream && mvn clean install -U -DskipTests && cd .. + - uses: actions/checkout@v3 + with: + repository: AutoMQ/s3stream-e2e + ref: main + path: s3stream-e2e + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + cache: "maven" + - name: Change s3stream version + run: | + export S3STREAM_VERSION=$(cat s3stream/target/maven-archiver/pom.properties| grep version | awk -F '=' '{print $2}') + sed -i "s/.*<\/s3stream.version>/$S3STREAM_VERSION<\/s3stream.version>/g" s3stream-e2e/pom.xml + - name: Run tests + run: cd s3stream-e2e && mvn test -pl integration + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + if: success() || failure() # always run even if the previous step fails + with: + report_paths: '**/surefire-reports/TEST-*.xml' + annotate_only: true + include_passed: true + detailed_summary: true \ No newline at end of file From a41612d5a5d3142c94a8fdcf4be0606c71f9f8d3 Mon Sep 17 00:00:00 2001 From: SSpirits Date: Wed, 3 Jan 2024 17:37:12 +0800 Subject: [PATCH 02/10] ci(stream): trigger ci Signed-off-by: SSpirits --- s3stream/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/s3stream/pom.xml b/s3stream/pom.xml index b5b8db3b3..cf0d47349 100644 --- a/s3stream/pom.xml +++ b/s3stream/pom.xml @@ -36,6 +36,7 @@ UTF-8 1.32.0 1.9.20.1 + 1.9.20.1 From d59f7ec08726ad6aa393a4fad4e0dd5c042bd549 Mon Sep 17 00:00:00 2001 From: SSpirits Date: Wed, 3 Jan 2024 17:40:30 +0800 Subject: [PATCH 03/10] ci(stream): initialize java Signed-off-by: SSpirits --- .github/workflows/s3-stream-e2e.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/s3-stream-e2e.yml b/.github/workflows/s3-stream-e2e.yml index 5eb20498b..38015f5a9 100644 --- a/.github/workflows/s3-stream-e2e.yml +++ b/.github/workflows/s3-stream-e2e.yml @@ -11,27 +11,29 @@ jobs: test: runs-on: ubuntu-latest steps: + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + cache: "maven" - uses: actions/checkout@v3 with: submodules: true - - name: Build s3stream dependency - run: cd s3stream && mvn clean install -U -DskipTests && cd .. + - name: Build s3stream + working-directory: ./s3stream + run: mvn clean install -U -DskipTests - uses: actions/checkout@v3 with: repository: AutoMQ/s3stream-e2e ref: main path: s3stream-e2e - - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '17' - cache: "maven" - name: Change s3stream version run: | export S3STREAM_VERSION=$(cat s3stream/target/maven-archiver/pom.properties| grep version | awk -F '=' '{print $2}') sed -i "s/.*<\/s3stream.version>/$S3STREAM_VERSION<\/s3stream.version>/g" s3stream-e2e/pom.xml - name: Run tests - run: cd s3stream-e2e && mvn test -pl integration + working-directory: ./s3stream-e2e + run: mvn test -pl integration - name: Publish Test Report uses: mikepenz/action-junit-report@v3 if: success() || failure() # always run even if the previous step fails From 22145feaa43c21b039475721f0c007778e954d8a Mon Sep 17 00:00:00 2001 From: SSpirits Date: Wed, 3 Jan 2024 17:41:28 +0800 Subject: [PATCH 04/10] ci(stream): initialize java Signed-off-by: SSpirits --- .github/workflows/s3-stream-e2e.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/s3-stream-e2e.yml b/.github/workflows/s3-stream-e2e.yml index 38015f5a9..8a327433b 100644 --- a/.github/workflows/s3-stream-e2e.yml +++ b/.github/workflows/s3-stream-e2e.yml @@ -11,14 +11,14 @@ jobs: test: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + with: + submodules: true - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17' cache: "maven" - - uses: actions/checkout@v3 - with: - submodules: true - name: Build s3stream working-directory: ./s3stream run: mvn clean install -U -DskipTests From fd38a7bcc8d6f44243e0f8ec9f5731be0e967ce7 Mon Sep 17 00:00:00 2001 From: SSpirits Date: Wed, 3 Jan 2024 17:48:52 +0800 Subject: [PATCH 05/10] ci(stream): add secret to clone e2e repo Signed-off-by: SSpirits --- .github/workflows/s3-stream-e2e.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/s3-stream-e2e.yml b/.github/workflows/s3-stream-e2e.yml index 8a327433b..8968693b2 100644 --- a/.github/workflows/s3-stream-e2e.yml +++ b/.github/workflows/s3-stream-e2e.yml @@ -27,6 +27,7 @@ jobs: repository: AutoMQ/s3stream-e2e ref: main path: s3stream-e2e + token: ${{ secrets.PAT_E2E }} - name: Change s3stream version run: | export S3STREAM_VERSION=$(cat s3stream/target/maven-archiver/pom.properties| grep version | awk -F '=' '{print $2}') From 208756293a725791c2afdeab25cf2d28885b9eb8 Mon Sep 17 00:00:00 2001 From: SSpirits Date: Wed, 3 Jan 2024 18:10:15 +0800 Subject: [PATCH 06/10] ci(stream): test change s3stream version Signed-off-by: SSpirits --- .github/workflows/s3-stream-e2e.yml | 3 ++- s3stream/pom.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/s3-stream-e2e.yml b/.github/workflows/s3-stream-e2e.yml index 8968693b2..8131c13f5 100644 --- a/.github/workflows/s3-stream-e2e.yml +++ b/.github/workflows/s3-stream-e2e.yml @@ -30,7 +30,8 @@ jobs: token: ${{ secrets.PAT_E2E }} - name: Change s3stream version run: | - export S3STREAM_VERSION=$(cat s3stream/target/maven-archiver/pom.properties| grep version | awk -F '=' '{print $2}') + export S3STREAM_VERSION=$(cat s3stream/target/maven-archiver/pom.properties | grep version | awk -F '=' '{print $2}') + echo "change s3stream version of e2e test to $S3STREAM_VERSION" sed -i "s/.*<\/s3stream.version>/$S3STREAM_VERSION<\/s3stream.version>/g" s3stream-e2e/pom.xml - name: Run tests working-directory: ./s3stream-e2e diff --git a/s3stream/pom.xml b/s3stream/pom.xml index cf0d47349..31ba67b67 100644 --- a/s3stream/pom.xml +++ b/s3stream/pom.xml @@ -22,7 +22,7 @@ 4.0.0 com.automq.elasticstream s3stream - 0.13.0-SNAPSHOT + 0.18.0-SNAPSHOT 5.5.0 5.10.0 From 5f63f6b4015885db125d80717bf4d1d238b9546a Mon Sep 17 00:00:00 2001 From: SSpirits Date: Wed, 3 Jan 2024 18:16:01 +0800 Subject: [PATCH 07/10] ci(stream): test change s3stream version Signed-off-by: SSpirits --- .github/workflows/s3-stream-e2e.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/s3-stream-e2e.yml b/.github/workflows/s3-stream-e2e.yml index 8131c13f5..8d135f418 100644 --- a/.github/workflows/s3-stream-e2e.yml +++ b/.github/workflows/s3-stream-e2e.yml @@ -33,6 +33,10 @@ jobs: export S3STREAM_VERSION=$(cat s3stream/target/maven-archiver/pom.properties | grep version | awk -F '=' '{print $2}') echo "change s3stream version of e2e test to $S3STREAM_VERSION" sed -i "s/.*<\/s3stream.version>/$S3STREAM_VERSION<\/s3stream.version>/g" s3stream-e2e/pom.xml + export LINE_START=$(grep -n '' pom.xml | awk -F ':' '{print $1}') + export LINE_END=$(grep -n '' pom.xml | awk -F ':' '{print $1}') + sed -i "${LINE_START},${LINE_END}d" s3stream-e2e/pom.xml + cat s3stream-e2e/pom.xml - name: Run tests working-directory: ./s3stream-e2e run: mvn test -pl integration From 7944f23ea09f7e8461c690c28310e1359a3e0030 Mon Sep 17 00:00:00 2001 From: SSpirits Date: Wed, 3 Jan 2024 18:18:56 +0800 Subject: [PATCH 08/10] ci(stream): test change s3stream version Signed-off-by: SSpirits --- .github/workflows/s3-stream-e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/s3-stream-e2e.yml b/.github/workflows/s3-stream-e2e.yml index 8d135f418..c0d038218 100644 --- a/.github/workflows/s3-stream-e2e.yml +++ b/.github/workflows/s3-stream-e2e.yml @@ -33,8 +33,8 @@ jobs: export S3STREAM_VERSION=$(cat s3stream/target/maven-archiver/pom.properties | grep version | awk -F '=' '{print $2}') echo "change s3stream version of e2e test to $S3STREAM_VERSION" sed -i "s/.*<\/s3stream.version>/$S3STREAM_VERSION<\/s3stream.version>/g" s3stream-e2e/pom.xml - export LINE_START=$(grep -n '' pom.xml | awk -F ':' '{print $1}') - export LINE_END=$(grep -n '' pom.xml | awk -F ':' '{print $1}') + export LINE_START=$(awk '//{print NR}' s3stream-e2e/pom.xml) + export LINE_END=$(awk '/<\/repositories>/{print NR}' s3stream-e2e/pom.xml) sed -i "${LINE_START},${LINE_END}d" s3stream-e2e/pom.xml cat s3stream-e2e/pom.xml - name: Run tests From 045ee6d467ea38ad9af008dd3f37bf4b2ffeb165 Mon Sep 17 00:00:00 2001 From: SSpirits Date: Wed, 3 Jan 2024 18:21:06 +0800 Subject: [PATCH 09/10] ci(stream): restore version of s3stream Signed-off-by: SSpirits --- s3stream/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3stream/pom.xml b/s3stream/pom.xml index 31ba67b67..cf0d47349 100644 --- a/s3stream/pom.xml +++ b/s3stream/pom.xml @@ -22,7 +22,7 @@ 4.0.0 com.automq.elasticstream s3stream - 0.18.0-SNAPSHOT + 0.13.0-SNAPSHOT 5.5.0 5.10.0 From 81b845273093e501e54000e2ac7a697e2f4dab1e Mon Sep 17 00:00:00 2001 From: SSpirits Date: Wed, 3 Jan 2024 18:21:31 +0800 Subject: [PATCH 10/10] ci(stream): restore version of s3stream Signed-off-by: SSpirits --- s3stream/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/s3stream/pom.xml b/s3stream/pom.xml index cf0d47349..b5b8db3b3 100644 --- a/s3stream/pom.xml +++ b/s3stream/pom.xml @@ -36,7 +36,6 @@ UTF-8 1.32.0 1.9.20.1 - 1.9.20.1