-
Notifications
You must be signed in to change notification settings - Fork 623
86 lines (86 loc) · 3.46 KB
/
test-integrations-web-1.yml
File metadata and controls
86 lines (86 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Do not edit this YAML file. This file is generated automatically by executing
# python scripts/split_tox_gh_actions/split_tox_gh_actions.py
# The template responsible for it is in
# scripts/split_tox_gh_actions/templates/base.jinja
name: Test Web 1
# Reusable workflow. It is invoked by the top-level `test.yml` orchestrator.
on:
workflow_call:
permissions:
contents: read
actions: read
jobs:
test-web_1:
name: Web 1
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.14t"]
os: [ubuntu-22.04]
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: sentry
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
# Maps tcp port 5432 on service container to the host
ports:
- 5432:5432
env:
# 3.6/3.7 run in the python:X.Y container; tell uv to use that system Python.
TOX_UV_PYTHON_PREFERENCE: ${{ (matrix.python-version == '3.6' || matrix.python-version == '3.7') && 'only-system' || 'managed' }}
SENTRY_PYTHON_TEST_POSTGRES_HOST: ${{ (matrix.python-version == '3.6' || matrix.python-version == '3.7') && 'postgres' || 'localhost' }}
SENTRY_PYTHON_TEST_POSTGRES_USER: postgres
SENTRY_PYTHON_TEST_POSTGRES_PASSWORD: sentry
container: ${{ (matrix.python-version == '3.6' || matrix.python-version == '3.7') && format('python:{0}', matrix.python-version) || null }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false
- name: Mark workspace safe for git (3.6/3.7 container)
# needed to make git rev-parse work in the containers
# subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git.
if: ${{ matrix.python-version == '3.6' || matrix.python-version == '3.7' }}
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Setup Test Env
run: |
uv sync
- name: Test django
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-django"
- name: Test flask
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-flask"
- name: Test starlette
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-starlette"
- name: Test fastapi
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-fastapi"
- name: Upload coverage data
if: ${{ !cancelled() }}
continue-on-error: true
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-web_1-${{ matrix.python-version }}
# .coverage-* / .junitxml-* are dotfiles, excluded by default
include-hidden-files: true
path: |
.coverage-sentry-*
.junitxml-*
if-no-files-found: 'ignore'
retention-days: 1
overwrite: true