File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,26 @@ BUCKET=https://data.geocode.earth/placeholder
33
44export AGENT=" github/${GITHUB_ACTOR} "
55export REFERER=" ${GITHUB_SERVER_URL} /${GITHUB_REPOSITORY} "
6- mkdir data
7- curl -A ${AGENT} -e ${REFERER} -sfo data/store.sqlite3.gz ${BUCKET} /$( date +%Y-%m-%d) /store.sqlite3.gz || true
8- [ -e data/store.sqlite3.gz ] || curl -A ${AGENT} -e ${REFERER} -so data/store.sqlite3.gz ${BUCKET} /store.sqlite3.gz
9- gunzip data/store.sqlite3.gz
106
7+ if [ ! -e data/store.sqlite3 ]; then
8+ # ensure data directory exists
9+ mkdir -p data
10+
11+ # attempt to download today's data first, fall back to latest if not found
12+ echo " Downloading placeholder data..."
13+ curl -A " ${AGENT} " -e " ${REFERER} " -sfo data/store.sqlite3.gz ${BUCKET} /$( date +%Y-%m-%d) /store.sqlite3.gz || true
14+ [ -e data/store.sqlite3.gz ] || curl -A " ${AGENT} " -e " ${REFERER} " -so data/store.sqlite3.gz ${BUCKET} /store.sqlite3.gz
15+
16+ # decompress the sqlite database
17+ echo " Decompressing placeholder data..."
18+ gunzip -f data/store.sqlite3.gz
19+ fi
20+
21+ # check sqlite3 version
1122sqlite3 --version
1223
24+ # install npm dependencies
1325npm install
1426
27+ # run all tests
1528npm run all
You can’t perform that action at this time.
0 commit comments