From 0d563e5f1ee13cc6262627f46d81a6baec0c1675 Mon Sep 17 00:00:00 2001 From: Thibaut Durand Date: Fri, 4 Oct 2024 05:57:05 -0700 Subject: [PATCH] Update action (#19) --- .github/workflows/test-install-local.yaml | 66 +++++++++++++++++++++++ .github/workflows/test-install.yaml | 65 ++++++++++++++++++++++ action.yaml | 9 +--- 3 files changed, 132 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-install-local.yaml b/.github/workflows/test-install-local.yaml index b4ff1ed..d2ceac5 100644 --- a/.github/workflows/test-install-local.yaml +++ b/.github/workflows/test-install-local.yaml @@ -433,6 +433,72 @@ jobs: python -m pytest tests/functional + torch-poetry: + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + strategy: + max-parallel: 8 + fail-fast: false + matrix: + os: [ ubuntu-latest ] + python-version: [ '3.12', '3.11', '3.10', '3.9' ] + torch-version: [ + 2.4.1, + 2.4.0, + 2.3.1, + 2.3.0, + 2.2.2, + 2.2.1, + 2.2.0, + 2.1.2, + 2.1.1, + 2.1.0, + 2.0.1, + 2.0.0, + 1.13.1, + 1.13.0, + 1.12.1, + 1.12.0, + 1.11.0, + 1.10.2, + 1.10.1, + 1.10.0, + 1.9.1, + 1.9.0, + ] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Poetry + uses: snok/install-poetry@v1 + + - name: Set environment variable + run: | + echo $(poetry run poetry env info --path)/bin >> $GITHUB_PATH + + - name: Install valid package version + uses: ./ + with: + package-name: 'torch' + package-version: ${{ matrix.torch-version }} + python-version: ${{ matrix.python-version }} + + - name: Install packages + run: | + pip install coola pytest + + - name: Run functional tests + run: | + python -m pytest tests/functional + + xarray: runs-on: ${{ matrix.os }} timeout-minutes: 10 diff --git a/.github/workflows/test-install.yaml b/.github/workflows/test-install.yaml index b4d2a27..3cff9cd 100644 --- a/.github/workflows/test-install.yaml +++ b/.github/workflows/test-install.yaml @@ -433,6 +433,71 @@ jobs: python -m pytest tests/functional + torch-poetry: + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + strategy: + max-parallel: 8 + fail-fast: false + matrix: + os: [ ubuntu-latest ] + python-version: [ '3.12', '3.11', '3.10', '3.9' ] + torch-version: [ + 2.4.1, + 2.4.0, + 2.3.1, + 2.3.0, + 2.2.2, + 2.2.1, + 2.2.0, + 2.1.2, + 2.1.1, + 2.1.0, + 2.0.1, + 2.0.0, + 1.13.1, + 1.13.0, + 1.12.1, + 1.12.0, + 1.11.0, + 1.10.2, + 1.10.1, + 1.10.0, + 1.9.1, + 1.9.0, + ] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Poetry + uses: snok/install-poetry@v1 + + - name: Set environment variable + run: | + echo $(poetry run poetry env info --path)/bin >> $GITHUB_PATH + + - name: Install valid package version + uses: ./ + with: + package-name: 'torch' + package-version: ${{ matrix.package-version }} + python-version: ${{ matrix.python-version }} + + - name: Install packages + run: | + pip install coola pytest + + - name: Run functional tests + run: | + python -m pytest tests/functional + xarray: runs-on: ${{ matrix.os }} timeout-minutes: 10 diff --git a/action.yaml b/action.yaml index c00094f..a61830e 100644 --- a/action.yaml +++ b/action.yaml @@ -25,17 +25,10 @@ outputs: runs: using: "composite" steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ inputs.python-version }} - - name: Install dependencies shell: bash run: | + which pip pip install "feu[cli]>=0.2.3" - name: Find closest valid version