From 07a0a56fe9537ac7b536dbc61ecf5524590a42f0 Mon Sep 17 00:00:00 2001 From: Pavel Zwerschke Date: Wed, 11 Oct 2023 15:12:10 +0200 Subject: [PATCH] add test --- .github/workflows/test-cache.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/test-cache.yml b/.github/workflows/test-cache.yml index 741d401..94df922 100644 --- a/.github/workflows/test-cache.yml +++ b/.github/workflows/test-cache.yml @@ -87,6 +87,44 @@ jobs: python -c "import os; env = os.path.basename(os.environ['CONDA_PREFIX']); assert env == 'env-name'" + test-env-changing-root-path1: + name: Test env cache with changing root path 1/2 + timeout-minutes: 10 + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + - uses: ./ + with: + environment-file: test/environment.yml + cache-environment-key: env-root-path-key-${{ github.sha }}-${{ github.run_attempt }} + - name: test environment name + run: | + python -c "import os; env = os.path.basename(os.environ['CONDA_PREFIX']); assert env == 'env-name'" + + test-env-changing-root-path2: + name: Test env cache with changing root path 2/2 + timeout-minutes: 10 + needs: test-env-changing-root-path1 + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + - uses: ./ + with: + environment-file: test/environment.yml + cache-environment-key: env-root-path-key-${{ github.sha }}-${{ github.run_attempt }} + - name: test environment name + run: | + python -c "import os; env = os.path.basename(os.environ['CONDA_PREFIX']); assert env == 'env-name'" + + test-env-then-download1: name: Test env then download 1/2 timeout-minutes: 10