Skip to content

viable strict: dedup two scripts, remove checkout of test-infra #1496

viable strict: dedup two scripts, remove checkout of test-infra

viable strict: dedup two scripts, remove checkout of test-infra #1496

Workflow file for this run

name: Tests
on:
pull_request:
paths:
- mypy.ini
- '**.py'
- '**requirements.txt'
- .github/scripts/**
- tools/tests/assets/**
- .github/workflows/tests.yml
push:
branches:
- main
paths:
- mypy.ini
- '**.py'
- '**requirements.txt'
- .github/scripts/**
- tools/tests/assets/**
- .github/workflows/tests.yml
jobs:
test-tools:
name: Test tools
if: ${{ github.repository == 'pytorch/test-infra' }}
uses: ./.github/workflows/linux_job.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 rockset==1.0.3 jsonschema==4.17.3
echo ::endgroup::
# Test tools
python3 -m unittest discover -vs tools/tests -p 'test_*.py'
test-github-scripts:
name: Test github scripts
if: ${{ github.repository == 'pytorch/test-infra' }}
uses: ./.github/workflows/linux_job.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 rockset==1.0.3 \
jsonschema==4.17.3 numpy==1.24.1 pandas==2.1.4 boto3==1.19.12
echo ::endgroup::
# Test tools
pytest -v .github/scripts/test_*.py