Skip to content

Commit

Permalink
Merge branch 'master' into fix-baggage
Browse files Browse the repository at this point in the history
  • Loading branch information
sentrivana authored Jul 1, 2024
2 parents 1f0f960 + 6701616 commit a13f9dd
Show file tree
Hide file tree
Showing 302 changed files with 18,048 additions and 8,399 deletions.
18 changes: 0 additions & 18 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,9 @@ updates:
- dependency-type: direct
- dependency-type: indirect
ignore:
- dependency-name: pytest
versions:
- "> 3.7.3"
- dependency-name: flake8 # Later versions dropped Python 2 support
versions:
- "> 5.0.4"
- dependency-name: jsonschema # Later versions dropped Python 2 support
versions:
- "> 3.2.0"
- dependency-name: pytest-cov
versions:
- "> 2.8.1"
- dependency-name: pytest-forked
versions:
- "> 1.1.3"
- dependency-name: sphinx
versions:
- ">= 2.4.a, < 2.5"
- dependency-name: tox
versions:
- "> 3.7.0"
- dependency-name: werkzeug
versions:
- "> 0.15.5, < 1"
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].7
- uses: actions/setup-python@v5
with:
python-version: 3.12
Expand All @@ -39,7 +39,7 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].7
- uses: actions/setup-python@v5
with:
python-version: 3.12
Expand All @@ -54,7 +54,7 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].7
- uses: actions/setup-python@v5
with:
python-version: 3.12
Expand All @@ -67,7 +67,6 @@ jobs:
- name: Build Packages
run: |
echo "Creating directory containing Python SDK Lambda Layer"
pip install virtualenv
# This will also trigger "make dist" that creates the Python packages
make aws-lambda-layer
- name: Upload Python Packages
Expand All @@ -83,13 +82,12 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].7
- uses: actions/setup-python@v5
with:
python-version: 3.12

- run: |
pip install virtualenv
make apidocs
cd docs/_build && zip -r gh-pages ./
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/[email protected].1
uses: actions/[email protected].7

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
name: "Release a new version"
steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].7
with:
token: ${{ secrets.GH_RELEASE_PAT }}
fetch-depth: 0
Expand Down
151 changes: 151 additions & 0 deletions .github/workflows/test-integrations-ai.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
name: Test AI
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-ai-latest:
name: AI (latest)
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7","3.9","3.11","3.12"]
# 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 }}
- name: Setup Test Env
run: |
pip install coverage tox
- name: Erase coverage
run: |
coverage erase
- name: Test anthropic latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-anthropic-latest"
- name: Test cohere latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-cohere-latest"
- name: Test langchain latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-latest"
- name: Test openai latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-openai-latest"
- name: Test huggingface_hub latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub-latest"
- name: Generate coverage XML
if: ${{ !cancelled() }}
run: |
coverage combine .coverage*
coverage xml -i
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
test-ai-pinned:
name: AI (pinned)
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7","3.9","3.11","3.12"]
# 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 }}
- name: Setup Test Env
run: |
pip install coverage tox
- name: Erase coverage
run: |
coverage erase
- name: Test anthropic pinned
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-anthropic"
- name: Test cohere pinned
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-cohere"
- name: Test langchain pinned
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain"
- name: Test openai pinned
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openai"
- name: Test huggingface_hub pinned
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-huggingface_hub"
- name: Generate coverage XML
if: ${{ !cancelled() }}
run: |
coverage combine .coverage*
coverage xml -i
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
check_required_tests:
name: All AI tests passed
needs: test-ai-pinned
# 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-ai-pinned.result, 'failure') || contains(needs.test-ai-pinned.result, 'skipped')
run: |
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
20 changes: 14 additions & 6 deletions .github/workflows/test-integrations-aws-lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
name: permissions check
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].7
with:
persist-credentials: false
- name: Check permissions on PR
Expand All @@ -53,7 +53,6 @@ jobs:
test-aws_lambda-pinned:
name: AWS Lambda (pinned)
timeout-minutes: 30
needs: check-permissions
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -64,31 +63,40 @@ jobs:
# 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]
needs: check-permissions
steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].7
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Test Env
run: |
pip install coverage "tox>=3,<4"
pip install coverage tox
- name: Erase coverage
run: |
coverage erase
- name: Test aws_lambda pinned
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda"
- name: Generate coverage XML
if: ${{ !cancelled() }}
run: |
coverage combine .coverage*
coverage xml -i
- uses: codecov/codecov-action@v4
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
check_required_tests:
name: All AWS Lambda tests passed
needs: test-aws_lambda-pinned
Expand Down
Loading

0 comments on commit a13f9dd

Please sign in to comment.