# CI for specifically ensuring integrations work fine (`transformers` mainly) # Useful tips: # - New integrations to test should have its own job, and follow a strategy method where we check both # the pypi and github versions. # - When checking the latest release of the integration, use # git checkout $(git describe --tags `git rev-list --tags --max-count=1`) to get the latest release. name: Integration Tests on: pull_request: paths: - "src/**" - "tests/**" - ".github/**" - "examples/**" - "setup.py" types: [opened, synchronize, reopened] env: HF_HOME: ~/hf_cache jobs: run-trainer-tests: runs-on: ubuntu-latest strategy: fail-fast: false steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up python 3.10 uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 with: python-version: '3.10' cache: 'pip' cache-dependency-path: 'setup.py' - name: Install Accelerate from source run: | pip install --upgrade pip pip install -e . - name: Clone and install transformers run: | cd .. git clone https://github.com/huggingface/transformers cd transformers pip install .[torch,testing] - name: Show installed libraries run: | pip freeze - name: Run Trainer tests env: WANDB_DISABLED: true run: | cd ../transformers pytest -sv tests/trainer