Skip to content

Commit

Permalink
build: upload test results (#367)
Browse files Browse the repository at this point in the history
* build: upload test results

* build: pass upload of test results always

Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
  • Loading branch information
joseph-sentry authored Feb 12, 2024
1 parent e1508e5 commit c1c13b0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ check-for-migration-conflicts:
python manage.py check_for_migration_conflicts

test:
python -m pytest --cov=./
python -m pytest --cov=./ --junitxml=junit.xml

test.unit:
python -m pytest --cov=./ -m "not integration" --cov-report=xml:unit.coverage.xml
python -m pytest --cov=./ -m "not integration" --cov-report=xml:unit.coverage.xml --junitxml=unit.junit.xml

test.integration:
python -m pytest --cov=./ -m "integration" --cov-report=xml:integration.coverage.xml
python -m pytest --cov=./ -m "integration" --cov-report=xml:integration.coverage.xml --junitxml=integration.junit.xml

lint:
make lint.install
Expand Down Expand Up @@ -207,12 +207,18 @@ test_env.check-for-migration-conflicts:

test_env.upload:
docker-compose exec api make test_env.container_upload CODECOV_UPLOAD_TOKEN=${CODECOV_UPLOAD_TOKEN} CODECOV_URL=${CODECOV_URL}
docker-compose exec api make test_env.container_upload_test_results CODECOV_UPLOAD_TOKEN=${CODECOV_UPLOAD_TOKEN} CODECOV_URL=${CODECOV_URL}

test_env.container_upload:
codecovcli -u ${CODECOV_URL} upload-process --flag unit-latest-uploader --flag unit \
--coverage-files-search-exclude-folder=graphql_api/types/** \
--coverage-files-search-exclude-folder=api/internal/tests/unit/views/cassetes/**

test_env.container_upload_test_results:
codecovcli -u ${CODECOV_URL} do-upload --report-type "test_results" \
--files-search-exclude-folder=graphql_api/types/** \
--files-search-exclude-folder=api/internal/tests/unit/views/cassetes/** || true

test_env.static_analysis:
docker-compose exec api make test_env.container_static_analysis CODECOV_STATIC_TOKEN=${CODECOV_STATIC_TOKEN}

Expand Down

0 comments on commit c1c13b0

Please sign in to comment.