7
description: 'Branch to test on'
11
run_transformers_integration_tests:
15
transformers-version: ['main', 'latest']
16
runs-on: ubuntu-latest
18
- uses: actions/checkout@v4
20
ref: ${{ github.event.inputs.branch }}
21
repository: ${{ github.event.pull_request.head.repo.full_name }}
23
uses: actions/setup-python@v4
25
python-version: "3.10"
27
cache-dependency-path: "setup.py"
28
- name: print environment variables
30
echo "env.CI_BRANCH = ${{ env.CI_BRANCH }}"
31
echo "env.CI_SHA = ${{ env.CI_SHA }}"
32
- name: Install dependencies
34
python -m pip install --upgrade pip
35
python -m pip install .[test]
36
if [ "${{ matrix.transformers-version }}" == "main" ]; then
37
pip install -U git+https://github.com/huggingface/transformers.git
39
echo "Nothing to do as transformers latest already installed"
42
- name: Test transformers integration
44
cd .. && git clone https://github.com/huggingface/transformers.git && cd transformers/ && git rev-parse HEAD
45
RUN_SLOW=1 pytest tests/peft_integration/test_peft_integration.py
46
run_diffusers_integration_tests:
50
# For now diffusers integration is not on PyPI
51
diffusers-version: ['main']
52
runs-on: ubuntu-latest
54
- uses: actions/checkout@v4
56
ref: ${{ github.event.inputs.branch }}
57
repository: ${{ github.event.pull_request.head.repo.full_name }}
59
uses: actions/setup-python@v4
61
python-version: "3.10"
63
cache-dependency-path: "setup.py"
64
- name: print environment variables
66
echo "env.CI_BRANCH = ${{ env.CI_BRANCH }}"
67
echo "env.CI_SHA = ${{ env.CI_SHA }}"
68
- name: Install dependencies
70
python -m pip install --upgrade pip
71
python -m pip install .[test]
73
if [ "${{ matrix.diffusers-version }}" == "main" ]; then
74
pip install -U git+https://github.com/huggingface/diffusers.git
76
echo "Nothing to do as diffusers latest already installed"
79
- name: Test diffusers integration
81
cd .. && git clone https://github.com/huggingface/diffusers.git && cd diffusers/ && git rev-parse HEAD
82
pytest tests/lora/test_lora_layers_peft.py