-
Notifications
You must be signed in to change notification settings - Fork 100
33 lines (31 loc) · 1.23 KB
/
ci-cache-environments.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# It seems like the caching of the environment needs to be run on the main branch if the cache is to be used by child
# branches in PRs:
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
name: Cache Python Environments
on:
push:
branches:
- 'main'
jobs:
cache-python-environments:
name: Cache Python Environments
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.12"]
steps:
- name: Check-out the repo
uses: actions/checkout@v4
- name: Cache Python ${{ matrix.python-version }} Environment
uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
cache-pre-commit-environment: true
hatch-environment-cache-config-json: >-
{
"configs": [
{"hatch_project_directory": ".", "hatch_environment_name": "dev-env"},
{"hatch_project_directory": ".", "hatch_environment_name": "postgres-env"},
{"hatch_project_directory": "./metricflow-semantics", "hatch_environment_name": "dev-env"}
]
}