Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed Dec 5, 2023
1 parent 9c99a04 commit 3bfb1d9
Show file tree
Hide file tree
Showing 5 changed files with 410 additions and 414 deletions.
294 changes: 147 additions & 147 deletions .github/workflows/test-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,159 +12,159 @@ defaults:
shell: bash -el {0}

jobs:
# test-download1:
# name: Test download cache 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-downloads-key: download-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-download1:
name: Test download cache 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-downloads-key: download-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-download2:
# name: Test download cache 2/2
# timeout-minutes: 10
# needs: test-download1
# 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-downloads-key: download-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-download2:
name: Test download cache 2/2
timeout-minutes: 10
needs: test-download1
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-downloads-key: download-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-env1:
# name: Test env cache 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-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-env1:
name: Test env cache 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-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-env2:
# name: Test env cache 2/2
# timeout-minutes: 10
# needs: test-env1
# 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-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-env2:
name: Test env cache 2/2
timeout-minutes: 10
needs: test-env1
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-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-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 }}
# micromamba-root-path: ~/micromamba
# - 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-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 }}
micromamba-root-path: ~/micromamba
- 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 }}
# micromamba-root-path: ~/micromamba2
# - 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 }}
micromamba-root-path: ~/micromamba2
- 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
# 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-then-download-env-${{ 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
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-then-download-env-${{ 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-download2:
# name: Test env then download 2/2
# timeout-minutes: 10
# needs: test-env-then-download1
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: [windows-latest, ubuntu-latest, macos-latest]
# steps:
# - uses: actions/checkout@v4
# - uses: ./
# with:
# # Since the environment is cached, there will be no downloaded packages in $MAMBA_ROOT_PREFIX/pkgs.
# # The caching should not fail because of this.
# environment-file: test/environment.yml
# cache-environment-key: env-then-download-env-${{ github.sha }}-${{ github.run_attempt }}
# cache-downloads-key: env-then-download-download-${{ 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 -d $MAMBA_ROOT_PREFIX
# ! test -d $MAMBA_ROOT_PREFIX/pkgs
test-env-then-download2:
name: Test env then download 2/2
timeout-minutes: 10
needs: test-env-then-download1
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: ./
with:
# Since the environment is cached, there will be no downloaded packages in $MAMBA_ROOT_PREFIX/pkgs.
# The caching should not fail because of this.
environment-file: test/environment.yml
cache-environment-key: env-then-download-env-${{ github.sha }}-${{ github.run_attempt }}
cache-downloads-key: env-then-download-download-${{ 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 -d $MAMBA_ROOT_PREFIX
! test -d $MAMBA_ROOT_PREFIX/pkgs
1 change: 0 additions & 1 deletion .github/workflows/test-post-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:

jobs:
test-post-cleanup:
if: false
name: ${{ matrix.post-cleanup }}
strategy:
matrix:
Expand Down
Loading

0 comments on commit 3bfb1d9

Please sign in to comment.