|
| 1 | +# This workflow uses actions that are not certified by GitHub. |
| 2 | +# They are provided by a third-party and are governed by |
| 3 | +# separate terms of service, privacy policy, and support documentation. |
| 4 | +# This workflow will download a prebuilt Java version, install dependencies and run integration tests |
| 5 | + |
| 6 | +name: Run Integration Tests |
| 7 | + |
| 8 | +on: |
| 9 | + |
| 10 | + # Allows you to run this workflow manually from the Actions tab |
| 11 | + workflow_dispatch: |
| 12 | + |
| 13 | +jobs: |
| 14 | + integration_test: |
| 15 | + name: Build and Run Integration Tests on Java ${{ matrix.java-version }} and ${{ matrix.os }} |
| 16 | + runs-on: ${{ matrix.os }} |
| 17 | + strategy: |
| 18 | + matrix: |
| 19 | + java-version: ['8'] |
| 20 | + os: [ubuntu-latest] |
| 21 | + |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + |
| 25 | + - name: Set up Java |
| 26 | + uses: actions/setup-java@v2 |
| 27 | + with: |
| 28 | + java-version: ${{ matrix.java-version }} |
| 29 | + distribution: 'adopt' |
| 30 | + |
| 31 | + - name: Execute Java integration tests |
| 32 | + # continue-on-error: true |
| 33 | + env: |
| 34 | + MVN_ARGS: '-B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' |
| 35 | + NATURAL_LANGUAGE_CLASSIFIER_URL: "https://api.us-south.natural-language-classifier.watson.cloud.ibm.com" |
| 36 | + NATURAL_LANGUAGE_CLASSIFIER_APIKEY: ${{ secrets.NLC_APIKEY }} |
| 37 | + NATURAL_LANGUAGE_CLASSIFIER_ID: ${{ secrets.NLC_CLASSIFIER_ID }} |
| 38 | + LANGUAGE_TRANSLATOR_APIKEY: ${{ secrets.LT_APIKEY }} |
| 39 | + LANGUAGE_TRANSLATOR_URL: "https://api.us-south.language-translator.watson.cloud.ibm.com" |
| 40 | + NATURAL_LANGUAGE_UNDERSTANDING_APIKEY: ${{ secrets.NLU_APIKEY }} |
| 41 | + NATURAL_LANGUAGE_UNDERSTANDING_URL: "https://api.us-south.natural-language-understanding.watson.cloud.ibm.com" |
| 42 | + PERSONALITY_INSIGHTS_APIKEY: ${{ secrets.PI_APIKEY }} |
| 43 | + PERSONALITY_INSIGHTS_URL: "https://api.us-south.personality-insights.watson.cloud.ibm.com" |
| 44 | + TONE_ANALYZER_APIKEY: ${{ secrets.TA_APIKEY }} |
| 45 | + TONE_ANALYZER_URL: "https://api.us-south.tone-analyzer.watson.cloud.ibm.com" |
| 46 | + SPEECH_TO_TEXT_APIKEY: ${{ secrets.STT_APIKEY }} |
| 47 | + SPEECH_TO_TEXT_URL: "https://api.us-south.speech-to-text.watson.cloud.ibm.com" |
| 48 | + SPEECH_TO_TEXT_CUSTOM_ID: ${{ secrets.STT_APIKEY_CUSTOM_ID }} |
| 49 | + SPEECH_TO_TEXT_ACOUSTIC_CUSTOM_ID: ${{ secrets.STT_APIKEY_ACOUSTIC_CUSTOM_ID }} |
| 50 | + TEXT_TO_SPEECH_APIKEY: ${{ secrets.TTS_APIKEY }} |
| 51 | + TEXT_TO_SPEECH_URL: "https://api.us-south.text-to-speech.watson.cloud.ibm.com" |
| 52 | + VISUAL_RECOGNITION_APIKEY: ${{ secrets.VR_APIKEY }} |
| 53 | + VISUAL_RECOGNITION_COLLECTION_ID: ${{ secrets.VR_COLLECTION_ID }} |
| 54 | + VISUAL_RECOGNITION_URL: "https://api.us-south.visual-recognition.watson.cloud.ibm.com" |
| 55 | + COMPARE_COMPLY_APIKEY: ${{ secrets.CC_APIKEY }} |
| 56 | + COMPARE_COMPLY_FEEDBACK_ID: ${{ secrets.CC_FEEDBACK_ID }} |
| 57 | + COMPARE_COMPLY_URL: "https://api.us-south.compare-comply.watson.cloud.ibm.com" |
| 58 | + ASSISTANT_APIKEY: ${{ secrets.WA_APIKEY }} |
| 59 | + ASSISTANT_WORKSPACE_ID: ${{ secrets.WA_WORKSPACE_ID }} |
| 60 | + ASSISTANT_ASSISTANT_ID: ${{ secrets.WA_ASSISTANT_ID }} |
| 61 | + ASSISTANT_URL: "https://api.us-south.assistant.watson.cloud.ibm.com" |
| 62 | + DISCOVERY_APIKEY: ${{ secrets.D1_APIKEY }} |
| 63 | + DISCOVERY_ENVIRONMENT_ID: ${{ secrets.D1_ENVIRONMENT_ID }} |
| 64 | + DISCOVERY_COLLECTION_ID: ${{ secrets.D1_COLLECTION_ID }} |
| 65 | + DISCOVERY_URL: "https://api.us-south.discovery.watson.cloud.ibm.com" |
| 66 | + DISCOVERY_V2_APIKEY: ${{ secrets.D2_APIKEY }} |
| 67 | + DISCOVERY_V2_PROJECT_ID: ${{ secrets.D2_PROJECT_ID }} |
| 68 | + DISCOVERY_V2_COLLECTION_ID: ${{ secrets.D2_COLLECTION_ID }} |
| 69 | + DISCOVERY_V2_URL: "https://api.us-south.discovery.watson.cloud.ibm.com" |
| 70 | + run: | |
| 71 | + mvn test -Dtest=v1/AssistantServiceIT -DfailIfNoTests=false -pl assistant,common $MVN_ARGS |
| 72 | + mvn test -Dtest=v2/AssistantServiceIT -DfailIfNoTests=false -pl assistant,common $MVN_ARGS |
| 73 | + mvn test -Dtest=CompareComplyServiceIT -DfailIfNoTests=false -pl compare-comply,common $MVN_ARGS |
| 74 | + mvn test -Dtest=v1/DiscoveryServiceIT -DfailIfNoTests=false -pl discovery,common $MVN_ARGS |
| 75 | + mvn test -Dtest=v2/DiscoveryIT -DfailIfNoTests=false -pl discovery,common $MVN_ARGS |
| 76 | + mvn test -Dtest=LanguageTranslatorIT -DfailIfNoTests=false -pl language-translator,common $MVN_ARGS |
| 77 | + mvn test -Dtest=NaturalLanguageClassifierIT -DfailIfNoTests=false -pl natural-language-classifier,common $MVN_ARGS |
| 78 | + mvn test -Dtest=NaturalLanguageUnderstandingIT -DfailIfNoTests=false -pl natural-language-understanding,common $MVN_ARGS |
| 79 | + mvn test -Dtest=PersonalityInsightsIT -DfailIfNoTests=false -pl personality-insights,common $MVN_ARGS |
| 80 | + mvn test -Dtest=SpeechToTextIT -DfailIfNoTests=false -pl speech-to-text,common $MVN_ARGS |
| 81 | + mvn test -Dtest=TextToSpeechIT -DfailIfNoTests=false -pl text-to-speech,common $MVN_ARGS |
| 82 | + mvn test -Dtest=CustomizationsIT -DfailIfNoTests=false -pl text-to-speech,common $MVN_ARGS |
| 83 | + mvn test -Dtest=ToneAnalyzerIT -DfailIfNoTests=false -pl tone-analyzer,common $MVN_ARGS |
| 84 | + mvn test -Dtest=v3/VisualRecognitionIT -DfailIfNoTests=false -pl visual-recognition,common $MVN_ARGS |
| 85 | + mvn test -Dtest=v4/VisualRecognitionIT -DfailIfNoTests=false -pl visual-recognition,common $MVN_ARGS |
| 86 | +
|
| 87 | + # Do not notify on success. We will leave the code here just in case we decide to switch gears |
| 88 | + - name: Notify slack on success |
| 89 | + if: false # success() |
| 90 | + env: |
| 91 | + SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} |
| 92 | + uses: voxmedia/github-action-slack-notify-build@v1 |
| 93 | + with: |
| 94 | + channel: watson-e2e-tests |
| 95 | + status: SUCCESS |
| 96 | + color: good |
| 97 | + |
| 98 | + - name: Notify slack on failure |
| 99 | + if: false # failure() |
| 100 | + env: |
| 101 | + SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} |
| 102 | + uses: voxmedia/github-action-slack-notify-build@v1 |
| 103 | + with: |
| 104 | + channel: watson-e2e-tests |
| 105 | + status: FAILED |
| 106 | + color: danger |
0 commit comments