@@ -20,10 +20,19 @@ concurrency:
20
20
21
21
defaults :
22
22
run :
23
- shell : bash -l {0}
23
+ shell : micromamba-shell {0}
24
24
25
25
jobs :
26
+ date :
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ - run : echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
30
+ id : date
31
+ shell : bash
32
+ outputs :
33
+ date : ${{ steps.date.outputs.date }}
26
34
build :
35
+ needs : [ date ]
27
36
name : build environment
28
37
runs-on : ubuntu-latest
29
38
steps :
@@ -34,18 +43,21 @@ jobs:
34
43
environment-file : 00_install/environment.yml
35
44
create-args : >-
36
45
conda
37
- cache-environment : true
38
46
cache-downloads : true
39
- init-shell : bash
47
+ cache-downloads-key : downloads-${{ needs.date.outputs.date }}
48
+ cache-environment : true
49
+ cache-environment-key : environment-${{ needs.date.outputs.date }}
50
+ init-shell : none
51
+ generate-run-shell : true
40
52
- run : python ./00_install/verify_install.py
41
53
- run : conda env export > roman-data-workshop-env-${{ github.sha }}.yml
42
54
43
55
with :
44
56
name : roman-data-workshop-env-${{ github.sha }}.yml
45
57
path : roman-data-workshop-env-${{ github.sha }}.yml
46
58
data :
59
+ needs : [ date, build ]
47
60
name : download data
48
- needs : [ build ]
49
61
runs-on : ubuntu-latest
50
62
steps :
51
63
- uses : actions/checkout@v3
@@ -60,15 +72,18 @@ jobs:
60
72
environment-file : 00_install/environment.yml
61
73
create-args : >-
62
74
conda
63
- cache-environment : true
64
75
cache-downloads : true
65
- init-shell : bash
76
+ cache-downloads-key : downloads-${{ needs.date.outputs.date }}
77
+ cache-environment : true
78
+ cache-environment-key : environment-${{ needs.date.outputs.date }}
79
+ init-shell : none
80
+ generate-run-shell : true
66
81
if : steps.data_cache.outputs.cache-hit != 'true'
67
82
- run : python data/download.py
68
83
if : steps.data_cache.outputs.cache-hit != 'true'
69
84
test :
85
+ needs : [ date, build, data ]
70
86
name : run notebooks
71
- needs : [ build, data ]
72
87
runs-on : ubuntu-latest
73
88
env :
74
89
CRDS_SERVER_URL : https://roman-crds-test.stsci.edu
83
98
environment-file : 00_install/environment.yml
84
99
create-args : >-
85
100
conda
86
- cache-environment : true
87
101
cache-downloads : true
88
- init-shell : bash
102
+ cache-downloads-key : downloads-${{ needs.date.outputs.date }}
103
+ cache-environment : true
104
+ cache-environment-key : environment-${{ needs.date.outputs.date }}
105
+ init-shell : none
106
+ generate-run-shell : true
89
107
- run : echo "name=crds_context::$(crds list --operational-context)" >> $GITHUB_OUTPUT
90
108
id : crds_context
91
109
- uses : actions/cache@v3
0 commit comments