Skip to content

Commit

Permalink
fix: restore integration tests for now
Browse files Browse the repository at this point in the history
  • Loading branch information
fboulnois committed Aug 22, 2024
1 parent 90f7c40 commit 33b1ea5
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/int-and-connected-test-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ jobs:
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
# This must be defined for the bash redirection
GOOGLE_APPLICATION_CREDENTIALS: 'jade-dev-account.json'
# This must be defined for the bash redirection
GOOGLE_SA_CERT: 'jade-dev-account.pem'
# Required for locking and deployment to integration namespace
K8_CLUSTER: 'integration-master'
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -99,3 +106,72 @@ jobs:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Whitelist Runner IP
uses: broadinstitute/datarepo-actions/actions/main@0.74.0
with:
actions_subcommand: 'gcp_whitelist'
sa_b64_credentials: ${{ secrets.SA_B64_CREDENTIALS }}
- name: Check for an available namespace to deploy API to and set state lock
uses: broadinstitute/datarepo-actions/actions/main@0.74.0
with:
actions_subcommand: 'k8_checknamespace'
k8_namespaces: 'integration-1,integration-2,integration-3,integration-6'
sa_b64_credentials: ${{ secrets.SA_B64_CREDENTIALS }}
- name: Build docker container via Gradle
uses: broadinstitute/datarepo-actions/actions/main@0.74.0
env:
# Unset the GitHub Action default JAVA_HOME to build with JDK 17
JAVA_HOME:
with:
actions_subcommand: 'gradlebuild' # creates gcr build with git_hash tag
sa_b64_credentials: ${{ secrets.SA_B64_CREDENTIALS }}
- name: Deploy to cluster with Helm
uses: broadinstitute/datarepo-actions/actions/main@0.74.0
with:
actions_subcommand: 'helmdeploy'
helm_create_secret_manager_secret_version: 0.0.8
helm_datarepo_api_chart_version: 0.0.744
helm_datarepo_ui_chart_version: 0.0.362
helm_gcloud_sqlproxy_chart_version: 0.19.13
helm_oidc_proxy_chart_version: 0.0.44
sa_b64_credentials: ${{ secrets.SA_B64_CREDENTIALS }}
- name: Fetch gitHash for deployed integration version
id: configuration
run: |
git_hash=$(git rev-parse --short HEAD)
echo "git_hash=${git_hash}" >> $GITHUB_OUTPUT
echo "Latest git hash for this branch: $git_hash"
- name: Wait for deployment to come back online
uses: broadinstitute/datarepo-actions/actions/wait-for-deployment@0.74.0
timeout-minutes: 20
env:
DESIRED_GITHASH: ${{ steps.configuration.outputs.git_hash }}
DEPLOYMENT_TYPE: 'api'
- name: Run test runner smoke tests via Gradle
uses: broadinstitute/datarepo-actions/actions/main@0.74.0
with:
actions_subcommand: 'gradletestrunnersmoketest'
sa_b64_credentials: ${{ secrets.SA_B64_CREDENTIALS }}
- name: Run integration tests via Gradle
uses: broadinstitute/datarepo-actions/actions/main@0.74.0
env:
AZURE_CREDENTIALS_APPLICATIONID: ${{ env.AZURE_CREDENTIALS_APPLICATIONID }}
AZURE_CREDENTIALS_HOMETENANTID: ${{ env.AZURE_CREDENTIALS_HOMETENANTID }}
TDR_LOG_APPENDER: 'Console-Standard'
with:
actions_subcommand: 'gradleinttest'
pgport: ${{ job.services.postgres.ports[5432] }}
test_to_run: 'testIntegration'
sa_b64_credentials: ${{ secrets.SA_B64_CREDENTIALS }}
- name: Clean state lock from used Namespace on API deploy
if: always()
uses: broadinstitute/datarepo-actions/actions/main@0.74.0
with:
actions_subcommand: 'k8_checknamespace_clean'
sa_b64_credentials: ${{ secrets.SA_B64_CREDENTIALS }}
- name: Clean whitelisted Runner IP
if: always()
uses: broadinstitute/datarepo-actions/actions/main@0.74.0
with:
actions_subcommand: 'gcp_whitelist_clean'
sa_b64_credentials: ${{ secrets.SA_B64_CREDENTIALS }}

0 comments on commit 33b1ea5

Please sign in to comment.