|
@@ -29,7 +29,6 @@ jobs:
|
|
|
filters: .github/file-filters.yml
|
|
|
|
|
|
api-docs:
|
|
|
- if: needs.files-changed.outputs.api_docs == 'true'
|
|
|
needs: files-changed
|
|
|
name: api docs test
|
|
|
runs-on: ubuntu-20.04
|
|
@@ -40,16 +39,19 @@ jobs:
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
- uses: volta-cli/action@v1
|
|
|
+ if: needs.files-changed.outputs.api_docs == 'true'
|
|
|
|
|
|
- name: Setup sentry python env (python ${{ matrix.python-version }})
|
|
|
uses: ./.github/actions/setup-sentry
|
|
|
id: setup
|
|
|
+ if: needs.files-changed.outputs.api_docs == 'true'
|
|
|
with:
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
pip-cache-version: ${{ secrets.PIP_CACHE_VERSION }}
|
|
|
snuba: true
|
|
|
|
|
|
- name: Run API docs tests
|
|
|
+ if: needs.files-changed.outputs.api_docs == 'true'
|
|
|
# install ts-node for ts build scripts to execute properly without potentially installing
|
|
|
# conflicting deps when running scripts locally
|
|
|
# see: https://github.com/getsentry/sentry/pull/32328/files
|
|
@@ -57,7 +59,6 @@ jobs:
|
|
|
yarn add ts-node && make test-api-docs
|
|
|
|
|
|
backend-test:
|
|
|
- if: needs.files-changed.outputs.backend == 'true'
|
|
|
needs: files-changed
|
|
|
name: backend test
|
|
|
runs-on: ubuntu-20.04
|
|
@@ -86,6 +87,7 @@ jobs:
|
|
|
|
|
|
- name: Setup sentry env (python ${{ matrix.python-version }})
|
|
|
uses: ./.github/actions/setup-sentry
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
id: setup
|
|
|
with:
|
|
|
python-version: ${{ matrix.python-version }}
|
|
@@ -94,6 +96,7 @@ jobs:
|
|
|
pg-version: ${{ matrix.pg-version }}
|
|
|
|
|
|
- name: Run backend test (${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }})
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
run: |
|
|
|
# Note: `USE_SNUBA` is not used for backend tests because there are a few failing tests with Snuba enabled.
|
|
|
unset USE_SNUBA
|
|
@@ -103,7 +106,6 @@ jobs:
|
|
|
uses: ./.github/actions/artifacts
|
|
|
|
|
|
cli:
|
|
|
- if: needs.files-changed.outputs.backend == 'true'
|
|
|
needs: files-changed
|
|
|
name: cli test
|
|
|
runs-on: ubuntu-20.04
|
|
@@ -118,12 +120,14 @@ jobs:
|
|
|
- name: Setup sentry env (python ${{ matrix.python-version }})
|
|
|
uses: ./.github/actions/setup-sentry
|
|
|
id: setup
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
with:
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
pip-cache-version: ${{ secrets.PIP_CACHE_VERSION }}
|
|
|
pg-version: ${{ matrix.pg-version }}
|
|
|
|
|
|
- name: Run test
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
run: |
|
|
|
make test-cli
|
|
|
|
|
@@ -131,7 +135,6 @@ jobs:
|
|
|
uses: ./.github/actions/artifacts
|
|
|
|
|
|
lint:
|
|
|
- if: needs.files-changed.outputs.backend == 'true'
|
|
|
needs: files-changed
|
|
|
name: backend lint
|
|
|
runs-on: ubuntu-20.04
|
|
@@ -152,12 +155,14 @@ jobs:
|
|
|
|
|
|
- name: Setup Python ${{ matrix.python-version }}
|
|
|
uses: ./.github/actions/setup-python
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
with:
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
# Note this uses a different cache key than other backend-based workflows because this workflows dependencies are different
|
|
|
cache-files-hash: ${{ hashFiles('requirements-pre-commit.txt') }}
|
|
|
|
|
|
- name: Setup pre-commit
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
env:
|
|
|
SENTRY_NO_VIRTUALENV_CREATION: 1
|
|
|
run: |
|
|
@@ -180,6 +185,7 @@ jobs:
|
|
|
- added|modified: 'requirements-base.txt'
|
|
|
|
|
|
- name: Run pre-commit on changed files
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
run: |
|
|
|
# Run pre-commit to lint and format check files that were changed (but not deleted) compared to master.
|
|
|
# XXX: there is a very small chance that it'll expand to exceed Linux's limits
|
|
@@ -188,7 +194,7 @@ jobs:
|
|
|
|
|
|
# If working tree is dirty, commit and update if we have a token
|
|
|
- name: Apply any pre-commit fixed files
|
|
|
- if: steps.token.outcome == 'success' && github.ref != 'refs/heads/master' && always()
|
|
|
+ if: steps.token.outcome == 'success' && github.ref != 'refs/heads/master' && needs.files-changed.outputs.backend == 'true' && always()
|
|
|
uses: getsentry/action-github-commit@main
|
|
|
with:
|
|
|
github-token: ${{ steps.token.outputs.token }}
|
|
@@ -197,7 +203,6 @@ jobs:
|
|
|
uses: ./.github/actions/artifacts
|
|
|
|
|
|
migration:
|
|
|
- if: needs.files-changed.outputs.migration_lockfile == 'true'
|
|
|
needs: files-changed
|
|
|
name: check migration
|
|
|
runs-on: ubuntu-20.04
|
|
@@ -209,9 +214,11 @@ jobs:
|
|
|
steps:
|
|
|
- name: Checkout sentry
|
|
|
uses: actions/checkout@v2
|
|
|
+ if: needs.files-changed.outputs.migration_lockfile == 'true'
|
|
|
|
|
|
- name: Setup sentry env (python ${{ matrix.python-version }})
|
|
|
uses: ./.github/actions/setup-sentry
|
|
|
+ if: needs.files-changed.outputs.migration_lockfile == 'true'
|
|
|
id: setup
|
|
|
with:
|
|
|
python-version: ${{ matrix.python-version }}
|
|
@@ -219,6 +226,7 @@ jobs:
|
|
|
pg-version: ${{ matrix.pg-version }}
|
|
|
|
|
|
- name: Migration & lockfile checks
|
|
|
+ if: needs.files-changed.outputs.migration_lockfile == 'true'
|
|
|
env:
|
|
|
SENTRY_LOG_LEVEL: ERROR
|
|
|
PGPASSWORD: postgres
|
|
@@ -226,7 +234,6 @@ jobs:
|
|
|
./.github/workflows/scripts/migration-check.sh
|
|
|
|
|
|
plugins:
|
|
|
- if: needs.files-changed.outputs.plugins == 'true'
|
|
|
needs: files-changed
|
|
|
name: plugins test
|
|
|
runs-on: ubuntu-20.04
|
|
@@ -240,17 +247,18 @@ jobs:
|
|
|
- name: Setup sentry env (python ${{ matrix.python-version }})
|
|
|
uses: ./.github/actions/setup-sentry
|
|
|
id: setup
|
|
|
+ if: needs.files-changed.outputs.plugins == 'true'
|
|
|
with:
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
pip-cache-version: ${{ secrets.PIP_CACHE_VERSION }}
|
|
|
snuba: true
|
|
|
|
|
|
- name: Run test
|
|
|
+ if: needs.files-changed.outputs.plugins == 'true'
|
|
|
run: |
|
|
|
make test-plugins
|
|
|
|
|
|
relay:
|
|
|
- if: needs.files-changed.outputs.backend == 'true'
|
|
|
needs: files-changed
|
|
|
name: relay test
|
|
|
runs-on: ubuntu-20.04
|
|
@@ -268,6 +276,7 @@ jobs:
|
|
|
- name: Setup sentry env (python ${{ matrix.python-version }})
|
|
|
uses: ./.github/actions/setup-sentry
|
|
|
id: setup
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
with:
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
pip-cache-version: ${{ secrets.PIP_CACHE_VERSION }}
|
|
@@ -275,12 +284,14 @@ jobs:
|
|
|
kafka: true
|
|
|
|
|
|
- name: Pull relay image
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
run: |
|
|
|
# pull relay we'll run and kill it for each test
|
|
|
docker pull us.gcr.io/sentryio/relay:nightly
|
|
|
docker ps -a
|
|
|
|
|
|
- name: Run test
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
run: |
|
|
|
make test-relay-integration
|
|
|
|
|
@@ -288,7 +299,6 @@ jobs:
|
|
|
uses: ./.github/actions/artifacts
|
|
|
|
|
|
snuba:
|
|
|
- if: needs.files-changed.outputs.backend == 'true'
|
|
|
needs: files-changed
|
|
|
name: snuba test
|
|
|
runs-on: ubuntu-20.04
|
|
@@ -316,6 +326,7 @@ jobs:
|
|
|
|
|
|
- name: Setup sentry env (python ${{ matrix.python-version }})
|
|
|
uses: ./.github/actions/setup-sentry
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
id: setup
|
|
|
with:
|
|
|
python-version: ${{ matrix.python-version }}
|
|
@@ -324,6 +335,7 @@ jobs:
|
|
|
kafka: true
|
|
|
|
|
|
- name: Run snuba test (${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }})
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
run: |
|
|
|
make test-snuba
|
|
|
|
|
@@ -331,7 +343,6 @@ jobs:
|
|
|
uses: ./.github/actions/artifacts
|
|
|
|
|
|
symbolicator:
|
|
|
- if: needs.files-changed.outputs.backend == 'true'
|
|
|
needs: files-changed
|
|
|
name: symbolicator test
|
|
|
runs-on: ubuntu-20.04
|
|
@@ -349,6 +360,7 @@ jobs:
|
|
|
- name: Setup sentry env (python ${{ matrix.python-version }})
|
|
|
uses: ./.github/actions/setup-sentry
|
|
|
id: setup
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
with:
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
pip-cache-version: ${{ secrets.PIP_CACHE_VERSION }}
|
|
@@ -356,6 +368,7 @@ jobs:
|
|
|
kafka: true
|
|
|
|
|
|
- name: Start symbolicator
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
run: |
|
|
|
echo $PWD
|
|
|
docker run \
|
|
@@ -368,6 +381,7 @@ jobs:
|
|
|
docker ps -a
|
|
|
|
|
|
- name: Run test
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
run: |
|
|
|
make test-symbolicator
|
|
|
|
|
@@ -375,7 +389,6 @@ jobs:
|
|
|
uses: ./.github/actions/artifacts
|
|
|
|
|
|
typing:
|
|
|
- if: needs.files-changed.outputs.backend == 'true'
|
|
|
needs: files-changed
|
|
|
name: backend typing
|
|
|
runs-on: ubuntu-20.04
|
|
@@ -388,11 +401,13 @@ jobs:
|
|
|
|
|
|
- name: Setup Python ${{ matrix.python-version }}
|
|
|
uses: ./.github/actions/setup-python
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
with:
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
# Since we don't call the setup-sentry action we need to install libxmlsec1-dev
|
|
|
- name: Setup backend typing
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
env:
|
|
|
SENTRY_LIGHT_BUILD: 1
|
|
|
run: |
|
|
@@ -403,6 +418,7 @@ jobs:
|
|
|
pip install -U -e ".[dev]"
|
|
|
|
|
|
- name: Run backend typing (${{ steps.setup.outputs.matrix-instance-number }} of ${{ strategy.job-total }})
|
|
|
+ if: needs.files-changed.outputs.backend == 'true'
|
|
|
run: |
|
|
|
make backend-typing
|
|
|
|
|
@@ -423,7 +439,6 @@ jobs:
|
|
|
symbolicator,
|
|
|
typing,
|
|
|
]
|
|
|
- if: ${{ needs.files-changed.outputs.backend == 'true' }}
|
|
|
name: Backend
|
|
|
runs-on: ubuntu-20.04
|
|
|
steps:
|