Skip to content

Commit e1df2d2

Browse files
committed
Change e2e tests run condition
1 parent d97ba59 commit e1df2d2

File tree

4 files changed

+42
-130
lines changed

4 files changed

+42
-130
lines changed

.github/workflows/e2e.yml

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ on:
2323
workflow_dispatch:
2424

2525
jobs:
26-
modules:
27-
runs-on: ubuntu-latest
26+
build:
27+
runs-on: k8s-runner-e2e
2828
# We allow builds:
2929
# 1) When triggered manually
3030
# 2) When it's a merge into a branch
@@ -38,44 +38,10 @@ jobs:
3838
|| (contains(github.event.pull_request.labels.*.name, 'build')
3939
&& (github.event.action != 'labeled' || github.event.label.name == 'build')
4040
)
41-
steps:
42-
- uses: actions/[email protected]
43-
if: github.event_name != 'workflow_dispatch'
44-
with:
45-
path: plugin
46-
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
47-
if: github.event_name != 'workflow_dispatch'
48-
id: filter
49-
with:
50-
working-directory: plugin
51-
filters: |
52-
mssql-plugins:
53-
- 'mssql-plugins/**'
54-
mysql-plugins:
55-
- 'mysql-plugins/**'
56-
oracle-plugins:
57-
- 'oracle-plugins/**'
58-
postgresql-plugins:
59-
- 'postgresql-plugins/**'
60-
- name: Set modules list
61-
id: sml
62-
run: |
63-
if [ ${{ github.event_name }} != 'workflow_dispatch' ]; then
64-
echo "::set-output name=matrix::$( jq '.' --compact-output <<< '${{ steps.filter.outputs.changes }}')"
65-
else
66-
echo "::set-output name=matrix::['mssql-plugins','mysql-plugins','oracle-plugins','postgresql-plugins']"
67-
fi
68-
shell: bash
69-
outputs:
70-
matrix: ${{ steps.sml.outputs.matrix }}
71-
72-
build:
73-
needs: modules
74-
runs-on: k8s-runner-e2e
75-
if: needs.modules.outputs.matrix != '[]' && needs.modules.outputs.matrix != ''
7641
strategy:
7742
matrix:
78-
module: ${{ fromJson(needs.modules.outputs.matrix) }}
43+
module: [mysql-plugin, postgresql-plugin]
44+
fail-fast: false
7945
steps:
8046
# Pinned 1.0.0 version
8147
- uses: actions/[email protected]
@@ -112,13 +78,13 @@ jobs:
11278
uses: actions/[email protected]
11379
if: always()
11480
with:
115-
name: Cucumber report
81+
name: Cucumber report - ${{ matrix.module }}
11682
path: ./**/target/cucumber-reports
11783
- name: Upload debug files
11884
uses: actions/[email protected]
11985
if: always()
12086
with:
121-
name: Debug files
87+
name: Debug files - ${{ matrix.module }}
12288
path: ./**/target/e2e-debug
12389
- name: Upload files to GCS
12490
uses: google-github-actions/upload-cloud-storage@v0

mysql-plugin/pom.xml

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -123,93 +123,4 @@
123123
</plugin>
124124
</plugins>
125125
</build>
126-
<profiles>
127-
<profile>
128-
<id>e2e-tests</id>
129-
<properties>
130-
<testSourceLocation>src/e2e-test/java</testSourceLocation>
131-
</properties>
132-
<build>
133-
<testResources>
134-
<testResource>
135-
<directory>src/e2e-test/resources</directory>
136-
</testResource>
137-
</testResources>
138-
<plugins>
139-
<plugin>
140-
<groupId>org.apache.maven.plugins</groupId>
141-
<artifactId>maven-surefire-plugin</artifactId>
142-
<configuration>
143-
<skipTests>true</skipTests>
144-
</configuration>
145-
</plugin>
146-
147-
<plugin>
148-
<groupId>org.apache.maven.plugins</groupId>
149-
<artifactId>maven-failsafe-plugin</artifactId>
150-
<configuration>
151-
<includes>
152-
<include>TestRunner.java</include>
153-
</includes>
154-
</configuration>
155-
<executions>
156-
<execution>
157-
<goals>
158-
<goal>integration-test</goal>
159-
</goals>
160-
</execution>
161-
</executions>
162-
</plugin>
163-
164-
<plugin>
165-
<groupId>net.masterthought</groupId>
166-
<artifactId>maven-cucumber-reporting</artifactId>
167-
<version>5.5.0</version>
168-
169-
<executions>
170-
<execution>
171-
<id>execution</id>
172-
<phase>verify</phase>
173-
<goals>
174-
<goal>generate</goal>
175-
</goals>
176-
<configuration>
177-
<projectName>Cucumber Reports</projectName> <!-- Replace with project name -->
178-
<outputDirectory>target/cucumber-reports/advanced-reports</outputDirectory>
179-
<buildNumber>1</buildNumber>
180-
<skip>false</skip>
181-
<inputDirectory>${project.build.directory}/cucumber-reports</inputDirectory>
182-
<jsonFiles> <!-- supports wildcard or name pattern -->
183-
<param>**/*.json</param>
184-
</jsonFiles> <!-- optional, defaults to outputDirectory if not specified -->
185-
<classificationDirectory>${project.build.directory}/cucumber-reports</classificationDirectory>
186-
<checkBuildResult>true</checkBuildResult>
187-
</configuration>
188-
</execution>
189-
</executions>
190-
</plugin>
191-
</plugins>
192-
</build>
193-
194-
<dependencies>
195-
<dependency>
196-
<groupId>io.cdap.tests.e2e</groupId>
197-
<artifactId>cdap-e2e-framework</artifactId>
198-
<version>0.0.1-SNAPSHOT</version>
199-
<scope>test</scope>
200-
</dependency>
201-
<dependency>
202-
<groupId>ch.qos.logback</groupId>
203-
<artifactId>logback-core</artifactId>
204-
<version>1.2.8</version>
205-
<scope>runtime</scope>
206-
</dependency>
207-
<dependency>
208-
<groupId>com.google.guava</groupId>
209-
<artifactId>guava</artifactId>
210-
<version>27.0.1-jre</version>
211-
</dependency>
212-
</dependencies>
213-
</profile>
214-
</profiles>
215126
</project>

mysql-plugin/src/e2e-test/features/mysql/MySql.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
@Mysql
1818
Feature: Mysql - Verify Mysql source data transfer
19-
@MYSQL_SOURCE_TEST @MYSQL_SINK_TEST
19+
@MYSQL_SOURCE_TEST @MYSQL_SINK_TEST @Mysql_Required
2020
Scenario: To verify data is getting transferred from Mysql to Mysql successfully
2121
Given Open Datafusion Project to configure pipeline
2222
When Expand Plugin group in the LHS plugins list: "Source"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright © 2022 Cask Data, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
16+
package io.cdap.plugin.mysql.runners;
17+
18+
import io.cucumber.junit.Cucumber;
19+
import io.cucumber.junit.CucumberOptions;
20+
import org.junit.runner.RunWith;
21+
22+
/**
23+
* Test Runner to execute Mysql plugin test cases.
24+
*/
25+
@RunWith(Cucumber.class)
26+
@CucumberOptions(
27+
features = {"src/e2e-test/features"},
28+
glue = {"stepsdesign", "io.cdap.plugin.common.stepsdesign", "io.cdap.plugin.mysql.stepsdesign"},
29+
tags = {"@Mysql_Required"},
30+
plugin = {"pretty", "html:target/cucumber-html-report/mysql-required",
31+
"json:target/cucumber-reports/cucumber-mysql-required.json",
32+
"junit:target/cucumber-reports/cucumber-mysql-required.xml"}
33+
)
34+
public class TestRunnerRequired {
35+
}

0 commit comments

Comments
 (0)