Skip to content

Commit 4a7fdf0

Browse files
committed
trial composite nox-cache
1 parent 3e1e697 commit 4a7fdf0

File tree

4 files changed

+30
-18
lines changed

4 files changed

+30
-18
lines changed

.github/workflows/ci-docs-linkcheck.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,10 @@ jobs:
8383
conda list
8484
8585
- name: "nox cache"
86-
uses: actions/cache@v3
87-
env:
88-
# Increment the build number to force a cache refresh.
89-
CACHE_BUILD: 0
86+
uses: ./.github/workflows/composite/nox-cache
9087
with:
91-
path: ${{ github.workspace }}/.nox
92-
key: ${{ runner.os }}-nox-${{ env.ENV_NAME }}-py${{ matrix.python-version }}-b${{ env.CACHE_BUILD }}-${{ hashFiles(env.LOCK_FILE) }}
88+
# Increment the build number to force a cache refresh.
89+
cache_build: 0
9390

9491
- name: "iris linkcheck"
9592
env:

.github/workflows/ci-docs-tests.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,10 @@ jobs:
122122
python cartopy_feature_download.py physical --output ${CARTOPY_SHARE_DIR} --no-warn
123123
124124
- name: "nox cache"
125-
uses: actions/cache@v3
126-
env:
127-
# Increment the build number to force a cache refresh.
128-
CACHE_BUILD: 0
125+
uses: ./.github/workflows/composite/nox-cache
129126
with:
130-
path: ${{ github.workspace }}/.nox
131-
key: ${{ runner.os }}-nox-${{ env.ENV_NAME }}-py${{ matrix.python-version }}-b${{ env.CACHE_BUILD }}-${{ hashFiles(env.LOCK_FILE) }}
127+
# Increment the build number to force a cache refresh.
128+
cache_build: 0
132129

133130
- name: "iris configure"
134131
env:

.github/workflows/ci-tests.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,10 @@ jobs:
122122
python cartopy_feature_download.py physical --output ${CARTOPY_SHARE_DIR} --no-warn
123123
124124
- name: "nox cache"
125-
uses: actions/cache@v3
126-
env:
127-
# Increment the build number to force a cache refresh.
128-
CACHE_BUILD: 0
125+
uses: ./.github/workflows/composite/nox-cache
129126
with:
130-
path: ${{ github.workspace }}/.nox
131-
key: ${{ runner.os }}-nox-${{ env.ENV_NAME }}-py${{ matrix.python-version }}-b${{ env.CACHE_BUILD }}-${{ hashFiles(env.LOCK_FILE) }}
127+
# Increment the build number to force a cache refresh.
128+
cache_build: 0
132129

133130
- name: "iris configure"
134131
env:
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "nox cache"
2+
description: "cache the nox test environments"
3+
4+
#
5+
# Assumes the environment contains the following variables:
6+
# - ENV_NAME
7+
# - LOCK_FILE
8+
#
9+
inputs:
10+
cache_build:
11+
description: "nox cache version build number"
12+
required: false
13+
default: "0"
14+
15+
runs:
16+
using: "composite"
17+
steps:
18+
- uses: actions/cache@v3
19+
with:
20+
path: ${{ github.workspace }}/.nox
21+
key: ${{ runner.os }}-nox-${{ env.ENV_NAME }}-py${{ matrix.python-version }}-b${{ inputs.cache_build }}-${{ hashFiles(env.LOCK_FILE) }}

0 commit comments

Comments
 (0)