123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- name: acceptance [py3.6]
- on:
- push:
- branches:
- - master
- - releases/**
- pull_request:
- jobs:
- py3-acceptance:
- name: python3.6 acceptance
- runs-on: ubuntu-16.04
- timeout-minutes: 20
- strategy:
- matrix:
- instance: [0, 1, 2]
- env:
- MIGRATIONS_TEST_MIGRATE: 1
- TEST_GROUP_STRATEGY: roundrobin
- steps:
- - uses: actions/checkout@v2
- - uses: volta-cli/action@v1
- # If we make these jobs "required" to merge on GH, then on every PR, GitHub automatically
- # creates a status check in the "pending" state. This means that the workflow needs to run
- # for every PR in order to update the status checks.
- #
- # In order to optimize CI usage, we want the tests to only run when python files change,
- # since frontend changes should have no effect on these test suites. We cannot use GH workflow
- # path filters because entire workflow would be skipped vs skipping individual jobs which
- # would still allow this status check to pass.
- - name: Check for python file changes
- uses: getsentry/paths-filter@v2
- id: changes
- with:
- token: ${{ github.token }}
- filters: .github/file-filters.yml
- # XXX: If taking snapshots with this, be sure to remove above and the following `if` conditions!
- - name: Set python version output
- id: python-version
- if: steps.changes.outputs.backend == 'true'
- run: |
- echo "::set-output name=python-version::$(grep "3.6" .python-version)"
- # Until GH composite actions can use `uses`, we need to setup python here
- - uses: actions/setup-python@v2
- if: steps.changes.outputs.backend == 'true'
- with:
- python-version: ${{ steps.python-version.outputs.python-version }}
- - name: Setup pip
- uses: ./.github/actions/setup-pip
- id: pip
- if: steps.changes.outputs.backend == 'true'
- - name: pip cache
- uses: actions/cache@v2
- if: steps.changes.outputs.backend == 'true'
- with:
- path: ${{ steps.pip.outputs.pip-cache-dir }}
- key: ${{ runner.os }}-pip-py${{ steps.python-version.outputs.python-version }}-${{ hashFiles('**/requirements-*.txt') }}
- restore-keys: |
- ${{ runner.os }}-pip-py${{ steps.python-version.outputs.python-version }}
- - name: Setup sentry python env
- uses: ./.github/actions/setup-sentry
- id: setup
- if: steps.changes.outputs.backend == 'true'
- with:
- snuba: true
- - name: yarn cache
- uses: actions/cache@v2
- id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- if: steps.changes.outputs.backend == 'true'
- with:
- path: ${{ steps.setup.outputs.yarn-cache-dir }}
- key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- restore-keys: |
- ${{ runner.os }}-yarn-
- - name: Install Javascript Dependencies
- if: steps.changes.outputs.backend == 'true'
- run: |
- yarn install --frozen-lockfile
- - name: webpack
- if: steps.changes.outputs.backend == 'true'
- env:
- SENTRY_INSTRUMENTATION: 1
- SENTRY_WEBPACK_WEBHOOK_SECRET: ${{ secrets.SENTRY_WEBPACK_WEBHOOK_SECRET }}
- run: |
- yarn webpack --display errors-only
- - name: Run acceptance tests (#${{ steps.setup.outputs.matrix-instance-number }} of ${{ strategy.job-total }})
- if: steps.changes.outputs.backend == 'true'
- run: |
- mkdir -p ${{ steps.setup.outputs.acceptance-dir }}
- mkdir -p ${{ steps.setup.outputs.acceptance-dir }}-mobile
- mkdir -p ${{ steps.setup.outputs.acceptance-dir }}-tooltips
- make run-acceptance
- env:
- PYTEST_SNAPSHOTS_DIR: ${{ steps.setup.outputs.acceptance-dir }}
- USE_SNUBA: 1
- - name: Handle artifacts
- uses: ./.github/actions/artifacts
- # TODO(joshuarli): snapshots, visual-diff needs py3-acceptance.
|