Full Integration Tests #736
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Action for running client integration tests. This test uses local | |
# server changes but runs a published version of the client, so it will not pick | |
# up local client changes. | |
name: Full Integration Tests | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: '0 8 * * *' # Run nightly at 3AM ET | |
jobs: | |
full-integration-job: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:13.1 | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Initialize Postgres DB for local server test run | |
env: | |
PGPASSWORD: postgres | |
run: psql -h 127.0.0.1 -U postgres -f ./service/local-dev/local-postgres-init.sql | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Write credentials | |
id: write-credentials | |
uses: ./.github/actions/write-credentials | |
with: | |
user-delegated-sa-b64: ${{ secrets.USER_DELEGATED_SA_DEV }} | |
buffer-client-sa-b64: ${{ secrets.BUFFER_CLIENT_SA_DEV }} | |
testrunner-sa-b64: ${{ secrets.TESTRUNNER_SA_DEV }} | |
testrunner-k8s-sa-b64: ${{ secrets.TESTRUNNER_K8S_SA_DEV }} | |
wsm-sa-b64: ${{ secrets.WSM_SA_DEV }} | |
janitor-sa-b64: ${{ secrets.JANITOR_SA_DEV }} | |
policy-client-sa-b64: ${{ secrets.POLICY_CLIENT_SA_DEV }} | |
# Turn on TPS for integration tests | |
# TODO remove this once WOR-1441 removes the tps-enabled feature flag | |
- name: Write config | |
id: write-config | |
run: | | |
cat << EOF > "config/local-properties.yml" | |
workspace: | |
policy: | |
base-path: https://tps.dsde-dev.broadinstitute.org/ | |
cli: | |
server-name: broad-dev | |
feature: | |
tps-enabled: true | |
temporary-grant-enabled: true | |
EOF | |
- name: Launch local server | |
uses: ./.github/actions/start-local-server | |
- name: Run the integration test suite | |
id: integration-test | |
uses: ./.github/actions/integration-test | |
with: | |
test-server: workspace-local.json | |
test: suites/FullIntegration.json | |
- name: "Notify WSM Slack" | |
# post to WSM Slack when a run fails | |
if: failure() | |
uses: broadinstitute/[email protected] | |
# see https://github.com/broadinstitute/action-slack | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
MATRIX_CONTEXT: ${{ toJson(matrix) }} | |
with: | |
status: ${{ job.status }} | |
channel: "#dsp-core-services-alerts" | |
username: "WSM full integration test" | |
author_name: "${{ matrix.gradleTask }}" | |
icon_emoji: ":bangbang:" | |
fields: job, commit | |
- name: Archive WSM and TestRunner logs | |
id: archive_logs | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wsm-and-testrunner-logs | |
path: | | |
wsm.log | |
${{ steps.integration-test.outputs.results-dir }} |