Browse Source

Move chartcuterie into acceptance (#44142)

Matt Gaunt-Seo @ Sentry.io 2 years ago
parent
commit
4bf4e0df33

+ 8 - 77
.github/workflows/acceptance.yml

@@ -140,11 +140,11 @@ jobs:
       fail-fast: false
       matrix:
         # XXX: When updating this, make sure you also update MATRIX_INSTANCE_TOTAL.
-        instance: [0, 1, 2, 3]
+        instance: [0, 1, 2, 3, 4]
         pg-version: ['9.6']
     env:
       # XXX: MATRIX_INSTANCE_TOTAL must be hardcoded to the length of strategy.matrix.instance.
-      MATRIX_INSTANCE_TOTAL: 4
+      MATRIX_INSTANCE_TOTAL: 5
       VISUAL_SNAPSHOT_ENABLE: 1
       TEST_GROUP_STRATEGY: roundrobin
 
@@ -184,11 +184,16 @@ jobs:
         run: |
           yarn build-acceptance
 
+      - name: Build chartcuterie configuration module
+        run: |
+          make build-chartcuterie-config
+
       - name: Setup sentry env
         uses: ./.github/actions/setup-sentry
         id: setup
         with:
           snuba: true
+          chartcuterie: true
           pg-version: ${{ matrix.pg-version }}
 
       - name: Run acceptance tests (#${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }})
@@ -214,85 +219,11 @@ jobs:
         uses: ./.github/actions/artifacts
         if: ${{ always() && needs.files-changed.outputs.backend_all == 'true' }}
 
-  chartcuterie:
-    if: needs.files-changed.outputs.acceptance == 'true'
-    needs: files-changed
-    name: chartcuterie integration
-    runs-on: ubuntu-20.04
-    timeout-minutes: 30
-    strategy:
-      # This helps not having to run multiple jobs because one fails, thus, reducing resource usage
-      # and reducing the risk that one of many runs would turn red again (read: intermittent tests)
-      fail-fast: false
-      matrix:
-        # XXX: When updating this, make sure you also update MATRIX_INSTANCE_TOTAL.
-        instance: [0]
-    env:
-      # XXX: MATRIX_INSTANCE_TOTAL must be hardcoded to the length of strategy.matrix.instance.
-      MATRIX_INSTANCE_TOTAL: 1
-      TEST_GROUP_STRATEGY: roundrobin
-      VISUAL_SNAPSHOT_ENABLE: 1
-
-    steps:
-      - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8  # v3.1.0
-        with:
-          # Avoid codecov error message related to SHA resolution:
-          # https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
-          fetch-depth: '2'
-
-      - name: Setup sentry env
-        uses: ./.github/actions/setup-sentry
-        id: setup
-        with:
-          chartcuterie: true
-
-      - name: yarn cache
-        uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7  # v3.0.11
-        with:
-          path: ${{ steps.setup.outputs.yarn-cache-dir }}
-          key: ${{ runner.os }}-v2-yarn-${{ hashFiles('yarn.lock', 'api-docs/yarn.lock') }}
-
-      - name: node_modules cache
-        uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7  # v3.0.11
-        id: nodemodulescache
-        with:
-          path: node_modules
-          key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock', 'api-docs/yarn.lock') }}
-
-      - name: Install Javascript Dependencies
-        if: steps.nodemodulescache.outputs.cache-hit != 'true'
-        run: yarn install --frozen-lockfile
-
-      - name: Build chartcuterie configuration module
-        run: |
-          make build-chartcuterie-config
-
-      - name: Run chartcuterie tests (${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }})
-        run: |
-          mkdir -p ${{ steps.setup.outputs.acceptance-dir }}
-          make test-chartcuterie
-        env:
-          PYTEST_SNAPSHOTS_DIR: ${{ steps.setup.outputs.acceptance-dir }}
-
-      - name: Save snapshots
-        uses: getsentry/action-visual-snapshot@d08945864bd75129863897062b8c1687f1600a2d
-        with:
-          save-only: true
-          snapshot-path: .artifacts/visual-snapshots
-
-      # This job runs when FE or BE changes happen, however, we only upload coverage data for
-      # BE changes since it conflicts with codecov's carry forward functionality
-      # Upload coverage data even if running the tests step fails since
-      # it reduces large coverage fluctuations
-      - name: Handle artifacts
-        uses: ./.github/actions/artifacts
-        if: ${{ always() && needs.files-changed.outputs.backend_all == 'true' }}
-
   visual-diff:
     if: always()
     # This guarantees that we will only schedule Visual Snapshots if all
     # workflows that generate artifacts succeed
-    needs: [acceptance, frontend, chartcuterie, files-changed]
+    needs: [acceptance, frontend, files-changed]
     name: triggers visual snapshot
     runs-on: ubuntu-20.04
     timeout-minutes: 20

+ 0 - 0
tests/chartcuterie/test_chart_renderer.py → tests/acceptance/chartcuterie/test_chart_renderer.py