-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write Customization tests in python (#2918)
* port everything integration test related to python
- Loading branch information
1 parent
cb7cc84
commit 9b3b9bc
Showing
8 changed files
with
130 additions
and
83 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -55,11 +55,11 @@ jobs: | |
integration-test: | ||
if: github.repository_owner == 'getsentry' | ||
runs-on: ubuntu-20.04 | ||
name: "integration test" | ||
name: integration test ${{ matrix.compose_version }} - customizations ${{ matrix.customizations }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test_type: ["initial-install", "customizations"] | ||
customizations: ["disabled", "enabled"] | ||
compose_version: ["v2.0.1", "v2.7.0"] | ||
include: | ||
- compose_version: "v2.0.1" | ||
|
@@ -68,18 +68,19 @@ jobs: | |
compose_path: "/usr/local/lib/docker/cli-plugins" | ||
env: | ||
COMPOSE_PROJECT_NAME: self-hosted-${{ strategy.job-index }} | ||
SENTRY_DSN: https://[email protected]/6627632 | ||
REPORT_SELF_HOSTED_ISSUES: 1 | ||
REPORT_SELF_HOSTED_ISSUES: 0 | ||
SELF_HOSTED_TESTING_DSN: ${{ vars.SELF_HOSTED_TESTING_DSN }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup dev environment | ||
run: | | ||
pip install -r requirements-dev.txt | ||
echo "PY_COLORS=1" >> "$GITHUB_ENV" | ||
### pytest-sentry configuration ### | ||
if [ "$GITHUB_REPOSITORY" = "getsentry/self-hosted" ]; then | ||
echo "PYTEST_SENTRY_DSN=${{ env.SELF_HOSTED_TESTING_DSN }}" >> $GITHUB_ENV | ||
echo "PYTEST_SENTRY_DSN=$SELF_HOSTED_TESTING_DSN" >> $GITHUB_ENV | ||
echo "PYTEST_SENTRY_TRACES_SAMPLE_RATE=0" >> $GITHUB_ENV | ||
# This records failures on master to sentry in order to detect flakey tests, as it's | ||
|
@@ -102,13 +103,29 @@ jobs: | |
sudo chmod +x "${{ matrix.compose_path }}/docker-compose" | ||
- name: Install self-hosted | ||
run: ./install.sh | ||
uses: nick-fields/retry@v3 | ||
with: | ||
timeout_minutes: 10 | ||
max_attempts: 3 | ||
command: ./install.sh | ||
|
||
- name: Integration Test | ||
run: ./integration-test.sh --${{ matrix.test_type }} | ||
run: pytest --cov --junitxml=junit.xml --reruns 3 _integration-test/ --customizations=${{ matrix.customizations }} | ||
|
||
- name: Inspect failure | ||
if: failure() | ||
run: | | ||
docker compose ps | ||
docker compose logs | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
slug: getsentry/self-hosted | ||
|
||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 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 was deleted.
Oops, something went wrong.
This file contains 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