123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- name: acceptance
- on:
- push:
- branches:
- - master
- - releases/**
- pull_request:
- concurrency:
- group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
- cancel-in-progress: true
- env:
- SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3
- NODE_OPTIONS: '--max-old-space-size=4096'
- jobs:
- files-changed:
- name: detect what files changed
- runs-on: ubuntu-22.04
- timeout-minutes: 3
-
- outputs:
- acceptance: ${{ steps.changes.outputs.acceptance }}
- backend_all: ${{ steps.changes.outputs.backend_all }}
- steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- - name: Check for backend file changes
- uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd
- id: changes
- with:
- token: ${{ github.token }}
- filters: .github/file-filters.yml
- acceptance:
- if: needs.files-changed.outputs.acceptance == 'true'
- needs: files-changed
- name: acceptance
- runs-on: ubuntu-22.04
- timeout-minutes: 30
- strategy:
-
-
- fail-fast: false
- matrix:
-
- instance: [0, 1, 2, 3, 4]
- pg-version: ['14']
- env:
-
- MATRIX_INSTANCE_TOTAL: 5
- TEST_GROUP_STRATEGY: roundrobin
- steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Checkout sentry
- - uses: getsentry/action-setup-volta@e4939d337b83760d13a9d7030a6f68c9d0ee7581
- - name: Step configurations
- id: config
- run: |
- echo "webpack-path=.webpack_cache" >> "$GITHUB_OUTPUT"
- echo "WEBPACK_CACHE_PATH=.webpack_cache" >> "$GITHUB_ENV"
- - name: webpack cache
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2
- with:
- path: ${{ steps.config.outputs.webpack-path }}
- key: ${{ runner.os }}-v2-webpack-cache-${{ hashFiles('webpack.config.ts') }}
- - name: node_modules cache
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2
- 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: webpack
- env:
-
- SENTRY_WEBPACK_WEBHOOK_SECRET: ${{ secrets.SENTRY_WEBPACK_WEBHOOK_SECRET }}
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- 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 }})
- run: make run-acceptance
-
-
-
-
- - name: Handle artifacts
- uses: ./.github/actions/artifacts
- if: ${{ always() && needs.files-changed.outputs.backend_all == 'true' }}
- with:
- token: ${{ secrets.CODECOV_TOKEN }}
- acceptance-required-checks:
-
- if: always()
- name: Acceptance
- needs: [acceptance, files-changed]
- runs-on: ubuntu-22.04
- timeout-minutes: 3
- steps:
- - name: Check for failures
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
- run: |
- echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1
|