-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into jferg/ignore-feedbacks-in-search
- Loading branch information
Showing
716 changed files
with
20,026 additions
and
16,410 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Carry forward codecov reports | ||
# This workflow carries forward coverage reports for commits in master | ||
# The coverage reports are generated by .github/workflows/codecov_per_test_coverage.yml | ||
# By carrying forward the reports and uploading the static analysis information | ||
# We can use the commits in master as the BASE for Automated Test Selection | ||
# see .github/workflows/codecov_ats.yml | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
carryforward-reports-and-upload-static-analysis: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.10.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10.10" | ||
- name: Download Codecov CLI | ||
run: | | ||
pip install --extra-index-url https://pypi.org/simple --no-cache-dir pytest codecov-cli==0.4.0 | ||
# Creates the commit and report objects in codecov | ||
# This carries forward previouly uploaded coverage reports to the new commit | ||
- name: Codecov startup | ||
run: | | ||
codecovcli create-commit | ||
codecovcli create-report | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
# Sends static analysis information to codecov | ||
# This is used as an input in Codecov Automated Test Selection. | ||
# It's necessary so we can use this commit as the BASE for comparison | ||
- name: Static Analysis | ||
run: | | ||
codecovcli static-analysis --token=${CODECOV_STATIC_TOKEN} \ | ||
--folders-to-exclude .artifacts \ | ||
--folders-to-exclude .github \ | ||
--folders-to-exclude .venv \ | ||
--folders-to-exclude static \ | ||
--folders-to-exclude bin | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
CODECOV_STATIC_TOKEN: ${{ secrets.CODECOV_STATIC_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Codecov - per test coverage | ||
# This workflow generates pytest coverage with the flag --cov-context=test | ||
# This coverage is used as input for Codecov Automated Test Selection (see .github/workflows/codecov_ats.yml) | ||
# However there's a performance toll in running tests with this flag. | ||
# So we will not be running the test suite on every commit | ||
|
||
on: [workflow_dispatch, workflow_call] | ||
|
||
jobs: | ||
# Same as 'backend' in .github/workflows/backed.yml | ||
# Except for run_backend_tests step (which includes the extra --cov-context=test flag) | ||
# And the coverage generation and handling | ||
backend-test-with-cov-context: | ||
if: github.ref == 'refs/heads/master' | ||
name: backend test | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 120 | ||
strategy: | ||
# This helps not having to run multiple jobs because one fails, thus, reducing resource usage | ||
# and reducing the risk that one of many runs would turn red again (read: intermittent tests) | ||
fail-fast: false | ||
matrix: | ||
# XXX: When updating this, make sure you also update MATRIX_INSTANCE_TOTAL. | ||
instance: [0, 1, 2, 3, 4, 5, 6] | ||
pg-version: ['14'] | ||
|
||
env: | ||
# XXX: `MATRIX_INSTANCE_TOTAL` must be hardcoded to the length of `strategy.matrix.instance`. | ||
# If this increases, make sure to also increase `flags.backend.after_n_builds` in `codecov.yml`. | ||
MATRIX_INSTANCE_TOTAL: 7 | ||
|
||
steps: | ||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 | ||
with: | ||
# Avoid codecov error message related to SHA resolution: | ||
# https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891 | ||
fetch-depth: '2' | ||
|
||
- name: Setup sentry env | ||
uses: ./.github/actions/setup-sentry | ||
id: setup | ||
with: | ||
kafka: true | ||
snuba: true | ||
symbolicator: true | ||
# Right now, we run so few bigtable related tests that the | ||
# overhead of running bigtable in all backend tests | ||
# is way smaller than the time it would take to run in its own job. | ||
bigtable: true | ||
pg-version: ${{ matrix.pg-version }} | ||
|
||
- name: Run backend test (${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }}) with --cov-context=test | ||
id: run_backend_tests | ||
run: | | ||
make test-python-ci COV_ARGS=--cov-context=test | ||
# Separate from the testing step above so that we always create the report | ||
# Even if some tests fail | ||
- name: Create coverage report in JSON format | ||
if: ${{ always() }} | ||
run: | | ||
coverage json --show-contexts -o .artifacts/python.coverage.json | ||
# Upload coverage data even if running the tests step fails since | ||
# it reduces large coverage fluctuations | ||
- name: Upload coverage - special case to test Codecov ATS | ||
if: ${{ always() }} | ||
uses: codecov/codecov-action@v4-beta | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
files: .artifacts/python.coverage.codecov.json | ||
flags: smart-tests | ||
plugins: compress-pycoverage | ||
continue-on-error: true |
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 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
Oops, something went wrong.