Stop re-implementing the log upload in backfill_events.py #5273
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
| name: Tests | |
| on: | |
| pull_request: | |
| paths: | |
| - mypy.ini | |
| - '**.py' | |
| - '**requirements.txt' | |
| - .github/scripts/** | |
| - tools/tests/assets/** | |
| - .github/workflows/tests.yml | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test-tools: | |
| name: Test tools | |
| if: ${{ github.repository == 'pytorch/test-infra' }} | |
| uses: ./.github/workflows/linux_job_v2.yml | |
| with: | |
| docker-image: python:3.11.0-slim-bullseye | |
| runner: linux.large | |
| script: | | |
| # Environment setup | |
| echo ::group::setup Python environment | |
| python -m venv .venv/ | |
| source .venv/bin/activate | |
| pip install pip==23.0.1 pytest==7.2.0 jsonschema==4.17.3 clickhouse-connect==0.8.14 requests==2.32.2 PyYAML==6.0.2 | |
| echo ::endgroup:: | |
| # Test tools | |
| python3 -m unittest discover -vs tools/tests -p 'test_*.py' | |
| # Test .github/scripts | |
| (cd .github/scripts && python3 -m unittest -v test_update_commit_hashes) | |
| test-aws-lambda: | |
| name: Test aws lambda | |
| if: ${{ github.repository == 'pytorch/test-infra' }} | |
| uses: ./.github/workflows/linux_job_v2.yml | |
| with: | |
| docker-image: python:3.10-slim-bullseye | |
| runner: linux.large | |
| script: | | |
| # Environment setup | |
| echo ::group::setup Python environment | |
| python -m venv .venv/ | |
| source .venv/bin/activate | |
| pip install -r aws/lambda/tests/test_requirements.txt | |
| echo ::endgroup:: | |
| # Test aws lambda, add relative path to PYTHONPATH for importing | |
| PYTHONPATH=aws/lambda:aws/lambda/benchmark_regression_summary_report pytest -v aws/lambda/tests |