Repository navigation
Faster Tests (DjangoCon) #1602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Faster Tests (DjangoCon) #1602
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
bbfbb94
Trying tox-gh
antonpirker 4723dd7
Splitting out django tests
antonpirker 88dce73
Better name
antonpirker d2cd775
Tailored matrix
antonpirker 14094c8
Better naming
antonpirker c59b679
Fixed naming
antonpirker ed2f8b4
Matrix stuff
antonpirker daeaa8a
Matrix stuff 2
antonpirker 0d2c0e7
Cleanup
antonpirker 95da9da
Fixed include matric
antonpirker d3958a9
Actually try to run the tests again.
antonpirker 59c8f79
Better call to tox
antonpirker fb99fa1
Removed some Django versions
antonpirker f04133d
Trying new matrix format
antonpirker b3f5137
Fixed python version string
antonpirker 1af02c3
Fixed matrix again
antonpirker 4d7ce29
Cleanup
antonpirker a51f12d
Cleanup Django test environments definistion
antonpirker d8d4143
Fixed pypy definition
antonpirker ecbce4a
First splitting everything
antonpirker b5729e2
Fixed typo
antonpirker 9fc5f72
Try to get nice env name
antonpirker bea6a1b
Fixed typo
antonpirker e9abdbf
Regenerated file
antonpirker 27a5184
Reactivated tests
antonpirker dbfeb34
Fixed shell var unpacking
antonpirker 977de5a
All the new config files
antonpirker 3967317
Deactivate redis/postgres everywhere to see where it is not needed.
antonpirker d42134d
Regenerate github actions config
antonpirker 9cee517
Removed setup-node
antonpirker efc9aec
Nicer GH actions names
antonpirker 4b7aafa
Even nicer GH actions names
antonpirker 89872cf
Do not run tox in parallel, because we have one workflow per env now.
antonpirker 9e35a38
Removed silent failing if postgres is not present.
antonpirker b078106
Render postgres only where it is needed (Django)
antonpirker 60a4857
Cleanup
antonpirker 695a109
Code cleanup
antonpirker 726e5c2
Run general tests (not integration specific)
antonpirker 883010d
Added general sdk tests
antonpirker 6f1a26a
Renamed ci files to reflect that those are test for integrations
antonpirker cb9dffa
Renamed common tests
antonpirker 44143c0
Added missing common tests file
antonpirker 6b5cfce
Show the five slowest tests when running tets
antonpirker 9bfaa9b
Try running all tests in ram drives
antonpirker 06ac31d
Cleanup
antonpirker 8149bc8
Handle empty params
antonpirker 556875b
Fix psychopg2 requirement
antonpirker e16a584
Fixed postgres related tests
antonpirker 0ce6180
Do not run Flask tests in Python 3.4
antonpirker 012245f
Cleanup
antonpirker f2a78ce
Fixed running of common tests
antonpirker 1ec79c8
Merge branch 'master' into antonpirker/tests-experiments
antonpirker c16171c
Ignore PyPy for now, because it has not been tested in PyPy the last …
antonpirker 1d4b3b2
Merge branch 'antonpirker/tests-experiments' of github.com:getsentry/…
antonpirker 7ea4dbf
Removed pypy from common tests.
antonpirker 23fb590
Removed PyPy
antonpirker bedc73d
Run all framework versions in one runner
antonpirker 023cdc7
Fixed typo
antonpirker f05a054
Fixed typo, now for real
antonpirker ff32466
Run testsuite in parallel mode again (because we now again run multip…
antonpirker 872ffb4
Cleanup
antonpirker e607cc1
Prevent tox parallel spinner output.
antonpirker dec4db3
Better name for job
antonpirker 0fca622
Removed tests from CI workflow (because they run now in multiple othe…
antonpirker a27acbf
Name change again
antonpirker c84d2c3
Merge branch 'master' into antonpirker/tests-experiments
antonpirker 8d10f5e
Cleanup
antonpirker 8542f0f
Merge branch 'antonpirker/tests-experiments' of github.com:getsentry/…
antonpirker bd2381c
Cleanup
antonpirker a34f8ab
More cleanup
antonpirker c307519
Fixed invocation of common tests
antonpirker b94ebd2
Fixed regex to run common tests
antonpirker 1b77ffd
Fixed calling the common tests again.
antonpirker 6d1bd77
Cleanup
antonpirker d07a213
Create ram dir in default location.
antonpirker b12406d
Reworded test requirements
antonpirker 7d12660
Fail CI when tox.ini and yaml files are out of sync
antonpirker 670b04a
Updated github actions config
antonpirker cc6f8d3
Made ram drive bigger, because we run in parallel now
antonpirker 5f4a031
Removed ram drive
antonpirker 794af55
try to fix gevent install on python 2.7
antonpirker f7a013a
Removed gevent from general test requirements
antonpirker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| name: Test Common | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - release/** | ||
|
|
||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| BUILD_CACHE_KEY: ${{ github.sha }} | ||
| CACHED_BUILD_PATHS: | | ||
| ${{ github.workspace }}/dist-serverless | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test Python ${{ matrix.python-version }}, ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 45 | ||
| continue-on-error: true | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest] | ||
| python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] | ||
| 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: | ||
| SENTRY_PYTHON_TEST_POSTGRES_USER: postgres | ||
| SENTRY_PYTHON_TEST_POSTGRES_PASSWORD: sentry | ||
| SENTRY_PYTHON_TEST_POSTGRES_NAME: ci_test | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Setup Test Env | ||
| env: | ||
| PGHOST: localhost | ||
| PGPASSWORD: sentry | ||
| run: | | ||
| pip install codecov tox | ||
|
|
||
| - name: Run Tests | ||
| env: | ||
| CI_PYTHON_VERSION: ${{ matrix.python-version }} | ||
| timeout-minutes: 45 | ||
| shell: bash | ||
| run: | | ||
| set -x # print commands that are executed | ||
| coverage erase | ||
|
|
||
| ./scripts/runtox.sh "py${{ matrix.python-version }}$" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch --ignore=tests/integrations | ||
| coverage combine .coverage* | ||
| coverage xml -i | ||
| codecov --file coverage.xml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: Test aiohttp | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - release/** | ||
|
|
||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| BUILD_CACHE_KEY: ${{ github.sha }} | ||
| CACHED_BUILD_PATHS: | | ||
| ${{ github.workspace }}/dist-serverless | ||
|
|
||
| jobs: | ||
| test: | ||
| name: aiohttp, python ${{ matrix.python-version }}, ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 45 | ||
| continue-on-error: true | ||
|
|
||
| strategy: | ||
| matrix: | ||
| python-version: ["3.7","3.8","3.9","3.10"] | ||
| os: [ubuntu-latest] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Setup Test Env | ||
| env: | ||
| PGHOST: localhost | ||
| PGPASSWORD: sentry | ||
| run: | | ||
| pip install codecov tox | ||
|
|
||
| - name: Test aiohttp | ||
| env: | ||
| CI_PYTHON_VERSION: ${{ matrix.python-version }} | ||
| timeout-minutes: 45 | ||
| shell: bash | ||
| run: | | ||
| set -x # print commands that are executed | ||
| coverage erase | ||
|
|
||
| ./scripts/runtox.sh "${{ matrix.python-version }}-aiohttp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch | ||
| coverage combine .coverage* | ||
| coverage xml -i | ||
| codecov --file coverage.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: Test asgi | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - release/** | ||
|
|
||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| BUILD_CACHE_KEY: ${{ github.sha }} | ||
| CACHED_BUILD_PATHS: | | ||
| ${{ github.workspace }}/dist-serverless | ||
|
|
||
| jobs: | ||
| test: | ||
| name: asgi, python ${{ matrix.python-version }}, ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 45 | ||
| continue-on-error: true | ||
|
|
||
| strategy: | ||
| matrix: | ||
| python-version: ["3.7","3.8","3.9","3.10"] | ||
| os: [ubuntu-latest] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Setup Test Env | ||
| env: | ||
| PGHOST: localhost | ||
| PGPASSWORD: sentry | ||
| run: | | ||
| pip install codecov tox | ||
|
|
||
| - name: Test asgi | ||
| env: | ||
| CI_PYTHON_VERSION: ${{ matrix.python-version }} | ||
| timeout-minutes: 45 | ||
| shell: bash | ||
| run: | | ||
| set -x # print commands that are executed | ||
| coverage erase | ||
|
|
||
| ./scripts/runtox.sh "${{ matrix.python-version }}-asgi" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch | ||
| coverage combine .coverage* | ||
| coverage xml -i | ||
| codecov --file coverage.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: Test aws_lambda | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - release/** | ||
|
|
||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| BUILD_CACHE_KEY: ${{ github.sha }} | ||
| CACHED_BUILD_PATHS: | | ||
| ${{ github.workspace }}/dist-serverless | ||
|
|
||
| jobs: | ||
| test: | ||
| name: aws_lambda, python ${{ matrix.python-version }}, ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 45 | ||
| continue-on-error: true | ||
|
|
||
| strategy: | ||
| matrix: | ||
| python-version: ["3.7"] | ||
| os: [ubuntu-latest] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Setup Test Env | ||
| env: | ||
| PGHOST: localhost | ||
| PGPASSWORD: sentry | ||
| run: | | ||
| pip install codecov tox | ||
|
|
||
| - name: Test aws_lambda | ||
| env: | ||
| CI_PYTHON_VERSION: ${{ matrix.python-version }} | ||
| timeout-minutes: 45 | ||
| shell: bash | ||
| run: | | ||
| set -x # print commands that are executed | ||
| coverage erase | ||
|
|
||
| ./scripts/runtox.sh "${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch | ||
| coverage combine .coverage* | ||
| coverage xml -i | ||
| codecov --file coverage.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: Test beam | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - release/** | ||
|
|
||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| BUILD_CACHE_KEY: ${{ github.sha }} | ||
| CACHED_BUILD_PATHS: | | ||
| ${{ github.workspace }}/dist-serverless | ||
|
|
||
| jobs: | ||
| test: | ||
| name: beam, python ${{ matrix.python-version }}, ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 45 | ||
| continue-on-error: true | ||
|
|
||
| strategy: | ||
| matrix: | ||
| python-version: ["3.7"] | ||
| os: [ubuntu-latest] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Setup Test Env | ||
| env: | ||
| PGHOST: localhost | ||
| PGPASSWORD: sentry | ||
| run: | | ||
| pip install codecov tox | ||
|
|
||
| - name: Test beam | ||
| env: | ||
| CI_PYTHON_VERSION: ${{ matrix.python-version }} | ||
| timeout-minutes: 45 | ||
| shell: bash | ||
| run: | | ||
| set -x # print commands that are executed | ||
| coverage erase | ||
|
|
||
| ./scripts/runtox.sh "${{ matrix.python-version }}-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch | ||
| coverage combine .coverage* | ||
| coverage xml -i | ||
| codecov --file coverage.xml |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.