name: Run Tests on: pull_request: paths: - "src/**" - "tests/**" - ".github/**" - "examples/**" - "setup.py" types: [opened, synchronize, reopened] env: HF_HOME: ~/hf_cache TESTING_MOCKED_DATALOADERS: "1" IS_GITHUB_CI: "1" jobs: run-tests: runs-on: group: aws-general-8-plus strategy: fail-fast: false matrix: pytorch-version: [ latest, minimum, ] test-kind: [ test_prod, test_core, test_cli, test_big_modeling, test_deepspeed, test_fsdp, test_example_differences, test_checkpoint_step, test_checkpoint_epoch, test_rest ] steps: - uses: actions/checkout@v6 - name: Set up python 3.10 uses: actions/setup-python@v6 with: python-version: '3.10' cache: 'pip' cache-dependency-path: 'setup.py' - name: Install the library run: | if [[ ${{ matrix.test-kind }} = test_prod ]]; then pip install -e .[test_prod]; fi if [[ ${{ matrix.test-kind }} != test_prod ]]; then pip install -e .[testing,test_trackers]; fi if [[ ${{ matrix.pytorch-version }} = minimum ]]; then pip install torchvision==0.19.0 torch==2.4.0; fi pip install pytest-reportlog tabulate setuptools importlib_metadata - name: Show installed libraries run: | pip freeze - name: Run Tests env: PYTORCH_VERSION: ${{ matrix.pytorch-version }} run: | make ${{ matrix.test-kind }} - name: Generate Report if: always() run: | python utils/log_reports.py >> $GITHUB_STEP_SUMMARY