From 85292064be2c081509b4ef93d65e0f2b6bb48791 Mon Sep 17 00:00:00 2001 From: Lucas Marshall Date: Tue, 12 Dec 2023 16:29:07 -0800 Subject: [PATCH] ci: get rid of some ci (#2061) --- .github/workflows/api_build_docker.yml | 17 +-- .github/workflows/integration_tests.yml | 111 ------------------ .../production_integration_tests.yml | 40 ------- .../workflows/sync_worker_build_docker.yml | 1 + 4 files changed, 2 insertions(+), 167 deletions(-) delete mode 100644 .github/workflows/integration_tests.yml delete mode 100644 .github/workflows/production_integration_tests.yml diff --git a/.github/workflows/api_build_docker.yml b/.github/workflows/api_build_docker.yml index 971a221df6..d8cf389047 100644 --- a/.github/workflows/api_build_docker.yml +++ b/.github/workflows/api_build_docker.yml @@ -32,6 +32,7 @@ jobs: build_and_push: name: Build and push Docker image uses: ./.github/workflows/docker_build_and_push.yml + if: github.event_name == 'push' with: workspace: api image-name: api @@ -42,19 +43,3 @@ jobs: STAGING_KUBECONFIG: ${{ secrets.STAGING_KUBECONFIG }} TURBO_TEAM: ${{ secrets.TURBO_TEAM }} TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - - test: - name: Run staging integration tests - needs: build_and_push - if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' - uses: ./.github/workflows/integration_tests.yml - with: - api-url: https://api.staging.supaglue.io - customer-id: customer1 - environment: Staging - release-ref: ${{ github.head_ref }} - secrets: - TESTING_API_KEY: ${{ secrets.STAGING_TESTING_API_KEY }} - SLACK_WEBHOOK_URL: ${{ secrets.ALERTS_SLACK_WEBHOOK_URL }} - PAGERDUTY_INTEGRATION_KEY: ${{ secrets.PAGERDUTY_INTEGRATION_KEY }} - TESTING_DATABASE_URL: ${{ secrets.STAGING_TESTING_DATABASE_URL }} diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml deleted file mode 100644 index f2e1bcca81..0000000000 --- a/.github/workflows/integration_tests.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: Integration Tests - -on: - workflow_call: - inputs: - release-ref: - description: Tag or SHA - required: true - type: string - api-url: - description: The URL of the API to test against - required: true - type: string - customer-id: - description: The customer ID to use for testing - required: true - type: string - environment: - description: The environment to use for testing - required: true - type: string - page-on-failure: - description: Whether to page on failure - required: false - type: boolean - secrets: - TESTING_API_KEY: - description: The API key to use for testing - required: true - SLACK_WEBHOOK_URL: - description: The Slack webhook URL to use for notifications - required: true - PAGERDUTY_INTEGRATION_KEY: - description: The PagerDuty integration key to use for paging - required: true - TESTING_DATABASE_URL: - description: The database URL to use for testing - required: true - -jobs: - test: - name: Run integration tests - timeout-minutes: 15 - runs-on: ubuntu-8cores-32gb - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - ref: ${{ inputs.release-ref }} - - - name: Setup Node.js environment - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: yarn - - - name: Install dependencies - run: | - corepack enable - yarn install - - - name: Run integration tests - run: yarn test:integration - env: - API_KEY: ${{ secrets.TESTING_API_KEY }} - API_URL: ${{ inputs.api-url }} - CUSTOMER_ID: ${{ inputs.customer-id }} - TESTING_DATABASE_URL: ${{ secrets.TESTING_DATABASE_URL }} - - - name: Slack on failure - id: slack - uses: slackapi/slack-github-action@v1 - if: failure() - with: - payload: | - { - "text": "🚨 ${{ inputs.environment }} Integration tests failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "🚨 Integration tests failed" - } - }, - { - "type": "context", - "elements": [ - { - "type": "mrkdwn", - "text": "Environment: ${{ inputs.environment }}" - }, - { - "type": "mrkdwn", - "text": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - } - ] - } - ] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - - - name: Send PagerDuty alert on failure - if: failure() && inputs.page-on-failure - uses: Entle/action-pagerduty-alert@0.2.0 - with: - pagerduty-integration-key: '${{ secrets.PAGERDUTY_INTEGRATION_KEY }}' - pagerduty-dedup-key: github_workflow_failed diff --git a/.github/workflows/production_integration_tests.yml b/.github/workflows/production_integration_tests.yml deleted file mode 100644 index e3460dd25f..0000000000 --- a/.github/workflows/production_integration_tests.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Run production integration tests - -on: - workflow_dispatch: - repository_dispatch: - types: [production_integration_tests] - schedule: - - cron: '*/30 * * * *' # every 30 minutes - -concurrency: - group: ${{ github.repository }}-api-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}-${{ github.event_name }} - -jobs: - tag: - name: Get latest production tag - runs-on: ubuntu-latest - outputs: - tag: ${{ steps.tag.outputs.tag }} - steps: - - uses: oprypin/find-latest-tag@v1 - with: - repository: supaglue-labs/supaglue - releases-only: true - id: tag - - test: - name: Run integration tests - uses: ./.github/workflows/integration_tests.yml - needs: tag - with: - api-url: https://api.supaglue.io - customer-id: customer1 - page-on-failure: true - environment: Production - release-ref: ${{ needs.tag.outputs.tag }} - secrets: - TESTING_API_KEY: ${{ secrets.PRODUCTION_TESTING_API_KEY }} - SLACK_WEBHOOK_URL: ${{ secrets.ALERTS_SLACK_WEBHOOK_URL }} - PAGERDUTY_INTEGRATION_KEY: ${{ secrets.PAGERDUTY_INTEGRATION_KEY }} - TESTING_DATABASE_URL: ${{ secrets.PRODUCTION_TESTING_DATABASE_URL }} diff --git a/.github/workflows/sync_worker_build_docker.yml b/.github/workflows/sync_worker_build_docker.yml index 01f1936cf2..64610f4999 100644 --- a/.github/workflows/sync_worker_build_docker.yml +++ b/.github/workflows/sync_worker_build_docker.yml @@ -30,6 +30,7 @@ jobs: build_and_push: name: Build and push Docker image uses: ./.github/workflows/docker_build_and_push.yml + if: github.event_name == 'push' with: workspace: sync-worker image-name: sync-worker