Skip to content

ref: upgrade just pytest #129489

ref: upgrade just pytest

ref: upgrade just pytest #129489

Workflow file for this run

name: backend
on:
push:
branches:
- master
pull_request:
# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
# hack for https://github.com/actions/cache/issues/810#issuecomment-1222550359
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3
jobs:
files-changed:
name: detect what files changed
runs-on: ubuntu-22.04
timeout-minutes: 3
# Map a step output to a job output
outputs:
api_docs: ${{ steps.changes.outputs.api_docs }}
backend: ${{ steps.changes.outputs.backend_all }}
backend_dependencies: ${{ steps.changes.outputs.backend_dependencies }}
backend_any_type: ${{ steps.changes.outputs.backend_any_type }}
migration_lockfile: ${{ steps.changes.outputs.migration_lockfile }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Check for backend file changes
uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
backend-test:
if: needs.files-changed.outputs.backend == 'true'
needs: files-changed
name: backend test
runs-on: ubuntu-22.04
timeout-minutes: 60
permissions:
contents: read
id-token: write
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: [3, 3, 3, 3, 3, 3, 3, 3]
pg-version: ['14']
env:
# XXX: `MATRIX_INSTANCE_TOTAL` must be hardcoded to the length of `strategy.matrix.instance`.
# If this increases, make sure to also increase `flags.backend.after_n_builds` in `codecov.yml`.
MATRIX_INSTANCE_TOTAL: 11
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup sentry env
uses: ./.github/actions/setup-sentry
id: setup
with:
redis_cluster: true
kafka: true
snuba: true
symbolicator: true
# Right now, we run so few bigtable related tests that the
# overhead of running bigtable in all backend tests
# is way smaller than the time it would take to run in its own job.
bigtable: true
pg-version: ${{ matrix.pg-version }}
- name: Run backend test (${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }})
run: |
make test-python-ci