Skip to content

Commit

Permalink
add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
sentrivana committed Jan 9, 2025
1 parent 0bb2159 commit e4b3cb2
Show file tree
Hide file tree
Showing 3 changed files with 561 additions and 0 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/test-integrations-flags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# 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 Flags
on:
push:
branches:
- master
- release/**
- sentry-sdk-2.0
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
permissions:
contents: read
env:
BUILD_CACHE_KEY: ${{ github.sha }}
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dist-serverless
jobs:
test-flags:
name: Flags
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"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/[email protected]
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Setup Test Env
run: |
pip install "coverage[toml]" tox
- name: Erase coverage
run: |
coverage erase
- name: Test launchdarkly
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-launchdarkly"
- name: Test openfeature
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-openfeature"
- name: Test unleash
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-unleash"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
# make sure no plugins alter our coverage reports
plugin: noop
verbose: true
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: .junitxml
verbose: true
check_required_tests:
name: All Flags tests passed
needs: test-flags
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-20.04
steps:
- name: Check for failures
if: contains(needs.test-flags.result, 'failure') || contains(needs.test-flags.result, 'skipped')
run: |
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
251 changes: 251 additions & 0 deletions scripts/populate_tox/dependencies.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
# XXX move this to conftest?
DEPENDENCIES = {
# package: [test_dependency_1, test_dependency_2, ...]
#
# The main package (e.g. aiohttp for the aiohttp test suite) needs to be
# the first dependency listed. The script will then query PYPI for releases
# of the package and will pick a handful to test against.
"aiohttp": [
"aiohttp",
"pytest-aiohttp",
"pytest-asyncio",
],
"anthropic": [
"anthropic",
"httpx", # TODO has an upper bound anthropic-v{0.16,0.28}: httpx<0.28.0
"pytest-asyncio",
],
"ariadne": [
"ariadne",
"fastapi",
"flask",
"httpx",
],
"arq": [
"arq",
"pydantic", # TODO arq-v0.23: pydantic<2
"fakeredis>=2.2.0,<2.8",
"pytest-asyncio",
"async-timeout",
],
"asyncpg": [
"asyncpg",
"pytest-asyncio",
],
"aws_lambda": [
"boto3",
],
"beam": ["apache-beam"],
"boto3": [
"boto3",
],
"bottle": [
"bottle",
"werkzeug<2.1.0",
],
"celery": [
"celery",
"importlib-metadata", # {py3.7}-celery: importlib-metadata<5.0
"newrelic",
"redis",
],
"chalice": [
"chalice",
"pytest-chalice==0.0.5",
],
"clickhouse-driver": [
"clickhouse-driver",
],
"cohere": [
"cohere",
],
"django": [
"django",
"channels[daphne]", # django-v{2.0,2.2,3.0,3.2,4.0,4.1,4.2,5.0,5.1}: channels[daphne]
"djangorestframework", # django-v{1.11,2.0,2.1,2.2,3.0,3.1,3.2}: djangorestframework>=3.0.0,<4.0.0
"psycopg2-binary",
"pytest-asyncio",
"pytest-django", # django-v{1.11,2.0,2.2,3.0}: pytest-django<4.0
"six", # django-v{2.2,3.0}: six
"werkzeug", # django-v{1.11,2.0,2.2,3.0,3.2}: Werkzeug<2.1.0
],
"dramatiq": [
"dramatiq",
],
"falcon": [
"falcon",
],
"fastapi": [
"fastapi",
"httpx",
"anyio<4.0.0",
"python-multipart",
"pytest-asyncio",
"requests",
],
"flask": [
"flask",
"flask-login",
"werkzeug", # flask-v{1,2.0}: Werkzeug<2.1.0
"markupsafe", # flask-v{1,2.0}: markupsafe<2.1.0
],
"gql": [
"gql[all]",
],
"graphene": [
"graphene",
"blinker",
"fastapi",
"flask",
"httpx",
],
"grpc": [
"grpcio",
"protobuf",
"mypy-protobuf",
"types-protobuf",
"pytest-asyncio",
],
"httpx": [
"httpx",
"anyio<4.0.0",
],
"huey": [
"huey",
],
"huggingface_hub": [
"huggingface_hub",
],
"langchain": [
"langchain",
"langchain-community",
"openai",
"tiktoken",
"httpx",
],
"langchain-notiktoken": [
"langchain",
"langchain-openai",
"openai",
],
"litestar": [
"litestar",
"pytest-asyncio",
"python-multipart",
"requests",
"cryptography",
"httpx",
],
"loguru": [
"loguru",
],
"openai": [
"openai",
"pytest-asyncio",
"tiktoken",
"httpx",
],
"openai-notiktoken": [
"openai",
"pytest-asyncio",
],
"openfeature": [
"openfeature-sdk",
],
"launchdarkly": [
"launchdarkly-server-sdk",
],
"opentelemetry": [
"opentelemetry-distro",
],
"pure_eval": [
"pure_eval",
],
"pymongo": [
"pymongo",
"mockupdb",
],
"pyramid": [
"pyramid",
"werkzeug<2.1.0",
],
"quart": [
"quart",
"quart-auth",
"pytest-asyncio",
"blinker",
"jinja2",
"hypercorn",
"taskgroup",
],
"ray": [
"ray",
],
"redis": [
"redis",
"fakeredis",
"pytest<8.0.0",
"pytest-asyncio",
],
"redis-py-cluster-legacy": [
"redis-py-cluster",
],
"requests": [
"requests",
],
"rq": [
"rq",
"fakeredis",
],
"sanic": [
"sanic",
"websockets<11.0",
"aiohttp",
"sanic_testing",
"aiocontextvars",
],
"spark": [
"pyspark",
],
"starlette": [
"starlette",
"pytest-asyncio",
"python-multipart",
"requests",
"anyio<4.0.0",
"jinja2",
"httpx",
],
"starlite": [
"starlite",
"pytest-asyncio",
"pytest-multipart",
"requests",
"cryptography",
"pydantic<2.0.0",
"httpx<0.28",
],
"sqlalchemy": [
"sqlalchemy",
],
"strawberry": [
"strawberry-graphql[fastapi,flask]",
"fastapi",
"flask",
"httpx",
],
"tornado": [
"tornado",
"pytest",
],
"trytond": [
"trytond",
"werkzeug",
],
"typer": [
"typer",
],
"unleash": [
"UnleashClient",
],
}
Loading

0 comments on commit e4b3cb2

Please sign in to comment.