diff --git a/.github/workflows/fabric8-next-version-schedule.yml b/.github/workflows/fabric8-next-version-schedule.yml index b0bc57ea75..42166c1fad 100644 --- a/.github/workflows/fabric8-next-version-schedule.yml +++ b/.github/workflows/fabric8-next-version-schedule.yml @@ -32,10 +32,12 @@ jobs: matrix: java: [ 11, 17 ] kubernetes: ['v1.28.12', 'v1.29.7','1.30.3', '1.31.0'] + it-category: [baseapi, dependent, workflow] uses: ./.github/workflows/integration-tests.yml with: java-version: ${{ matrix.java }} kube-version: ${{ matrix.kubernetes }} + it-category: ${{ matrix.it-category }} httpclient-tests: strategy: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index cb68af25d2..faf9eba0ac 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -21,6 +21,10 @@ on: type: string required: false default: '' + it-category: + type: string + required: false + default: '' jobs: integration_tests: @@ -42,9 +46,14 @@ jobs: - name: Set up Minikube uses: manusa/actions-setup-minikube@v2.12.0 with: - minikube version: v1.33.0 - kubernetes version: ${{ inputs.kube-version }} + minikube version: 'v1.33.0' + kubernetes version: '${{ inputs.kube-version }}'' driver: 'docker' github token: ${{ secrets.GITHUB_TOKEN }} - name: Run integration tests - run: ./mvnw ${MAVEN_ARGS} -B package -P no-unit-tests -Dfabric8-httpclient-impl.name=${{inputs.http-client}} --file pom.xml \ No newline at end of file + run: | + it_profile = "integration-tests" + if [ -z "${{inputs.it-category}}" ]; then + it_profile = "integration-tests-${{inputs.it-category}}" + fi + ./mvnw ${MAVEN_ARGS} -B package -P${it_profile} -T1C -Dfabric8-httpclient-impl.name=${{inputs.http-client}} --file pom.xml \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 471cea503e..1dc889061a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -35,10 +35,12 @@ jobs: matrix: java: [ 17, 21 ] kubernetes: [ 'v1.28.12', 'v1.29.7','1.30.3', '1.31.0' ] + it-category: [ baseapi, dependent, workflow ] uses: ./.github/workflows/integration-tests.yml with: java-version: ${{ matrix.java }} kube-version: ${{ matrix.kubernetes }} + it-category: ${{ matrix.it-category }} httpclient-tests: strategy: diff --git a/pom.xml b/pom.xml index a89059e155..4afe43b9fa 100644 --- a/pom.xml +++ b/pom.xml @@ -367,7 +367,7 @@ </build> </profile> <profile> - <id>no-unit-tests</id> + <id>integration-tests</id> <build> <plugins> <plugin> @@ -386,6 +386,66 @@ </plugins> </build> </profile> + <profile> + <id>integration-tests-baseapi</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <includes> + <include>**/baseapi/*IT.java</include> + </includes> + <excludes> + <exclude>**/*Test.java</exclude> + <exclude>**/*E2E.java</exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>integration-tests-dependent</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <includes> + <include>**/dependent/*IT.java</include> + </includes> + <excludes> + <exclude>**/*Test.java</exclude> + <exclude>**/*E2E.java</exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>integration-tests-workflow</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <includes> + <include>**/workflow/*IT.java</include> + </includes> + <excludes> + <exclude>**/*Test.java</exclude> + <exclude>**/*E2E.java</exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </build> + </profile> <!-- Special category of tests. See usage in source code. --> <profile> <id>minimal-watch-timeout-dependent-it</id>