Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 37 additions & 23 deletions .github/workflows/integrationTest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This workflow will build a Java project with Maven
# Integration tests for github are disabled temporarily
# This workflow builds the ./database/starters and ./spring-cloud-oci projects with `mvn install`.

name: Run the Integration Tests for Spring Cloud Oracle
name: Run the tests for Spring Cloud Oracle

on:
push:
Expand All @@ -10,32 +9,47 @@ on:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-22.04
database-starters:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5
- name: Setup Java 21
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: 'maven'
- name: Run Maven Build and Test
working-directory: ./database/starters
run: |
mvn clean install
spring-cloud-oci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Java 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
java-package: 'jdk'
cache: 'maven'
- name: Run Maven Build and Test
working-directory: ./spring-cloud-oci
run: |
mvn clean \
-Pspring-cloud-oci-ci-it \
-DuserId=${{ secrets.userId }} \
-DtenantId=${{ secrets.tenantId }} \
-Dfingerprint=${{ secrets.fingerprint }} \
-Dregion=${{ vars.region }} \
-DprivateKeyContent=${{ secrets.privateKeyContent }} \
-Dit.notification=${{ vars.it_notification }} \
-DtopicName=${{ vars.topicName }} \
-DcompartmentId=${{ secrets.compartmentId }} \
-Dit.logging=${{ vars.it_logging }} \
-DlogId=${{ vars.logId }} \
-Dit.storage=${{ vars.it_storage }} \
-DbucketName=${{ vars.bucketName }} \
install -DskipTests
mvn clean install
# Integration test suite temporarily disabled
# mvn clean \
# -Pspring-cloud-oci-ci-it \
# -DuserId=${{ secrets.userId }} \
# -DtenantId=${{ secrets.tenantId }} \
# -Dfingerprint=${{ secrets.fingerprint }} \
# -Dregion=${{ vars.region }} \
# -DprivateKeyContent=${{ secrets.privateKeyContent }} \
# -Dit.notification=${{ vars.it_notification }} \
# -DtopicName=${{ vars.topicName }} \
# -DcompartmentId=${{ secrets.compartmentId }} \
# -Dit.logging=${{ vars.it_logging }} \
# -DlogId=${{ vars.logId }} \
# -Dit.storage=${{ vars.it_storage }} \
# -DbucketName=${{ vars.bucketName }} \
# install
15 changes: 15 additions & 0 deletions spring-cloud-oci/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skipITs>true</skipITs>
<includes>
<include>**/*IT.java</include>
</includes>
Expand Down Expand Up @@ -513,6 +514,20 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
</plugins>
</build>
<profiles>
<profile>
<id>spring-cloud-oci-ci-it</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skipITs>false</skipITs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>docs</id>
<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, Oracle and/or its affiliates.
// Copyright (c) 2024, 2026, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
package com.oracle.cloud.spring.sample.vault.springcloudocivaultsample;

Expand All @@ -12,9 +12,8 @@
import com.oracle.bmc.vault.model.UpdateSecretDetails;
import com.oracle.bmc.vault.responses.UpdateSecretResponse;
import com.oracle.cloud.spring.vault.VaultTemplate;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
Expand All @@ -27,9 +26,7 @@
* This secret must be in the "ACTIVE" lifecycle state.
*/
@SpringBootTest
@EnabledIfEnvironmentVariable(named = "OCI_COMPARTMENT_ID", matches = ".+")
@EnabledIfEnvironmentVariable(named = "OCI_VAULT_ID", matches = ".+")
@Disabled
@EnabledIfSystemProperty(named = "it.vault", matches = "true")
public class VaultTemplateIT {
@Autowired
VaultTemplate vaultTemplate;
Expand Down