From f72f2bd5e8df10e425b5c5fbb5f6c8fefece5dad Mon Sep 17 00:00:00 2001 From: Ella Charlaix Date: Mon, 28 Oct 2024 17:30:52 +0100 Subject: [PATCH] add test --- .github/workflows/test_onnxruntime.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_onnxruntime.yml b/.github/workflows/test_onnxruntime.yml index 7bbe00bd157..2f646b5f417 100644 --- a/.github/workflows/test_onnxruntime.yml +++ b/.github/workflows/test_onnxruntime.yml @@ -17,8 +17,13 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.9] + transformers-version: ["latest"] os: [ubuntu-20.04, windows-2019, macos-13] + include: + os: ubuntu-20.04 + transformers-version: "4.36.*" + os: ubuntu-20.04 + transformers-version: "4.45.*" runs-on: ${{ matrix.os }} steps: @@ -33,10 +38,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Python ${{ matrix.python-version }} + - name: Setup Python uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: "3.9" - name: Install dependencies run: | @@ -44,6 +49,10 @@ jobs: pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu pip install .[tests,onnxruntime] + - name: Install transformers ${{ matrix.transformers-version }} + if: ${{ matrix.transformers-version != 'latest' }} # already installed + run: pip install transformers==${{ matrix.transformers-version }} + - name: Test with pytest (in series) working-directory: tests run: |