File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 env :
2929 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
3030 R_KEEP_PKG_SOURCE : yes
31- VALHALLA_URL : ${{ secrets.VALHALLA_URL }}
3231
3332 steps :
3433 - uses : actions/checkout@v4
4140 http-user-agent : ${{ matrix.config.http-user-agent }}
4241 use-public-rspm : true
4342
43+ - name : Start Valhalla (Docker, Berlin)
44+ if : runner.os == 'Linux'
45+ run : |
46+ set -eux
47+ DATA_DIR="${RUNNER_TEMP}/valhalla"
48+ mkdir -p "${DATA_DIR}"
49+
50+ docker run -dt --name valhalla -p 8002:8002 \
51+ -v "${DATA_DIR}:/custom_files" \
52+ -e tile_urls=https://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf \
53+ ghcr.io/valhalla/valhalla-scripted:latest
54+
55+ for i in {1..60}; do
56+ if curl -sf http://localhost:8002/status; then
57+ echo "Valhalla ready"; break
58+ fi
59+ sleep 2
60+ done
61+ shell : bash
62+
4463 - name : Create and populate .Renviron file
4564 run : |
46- echo VALHALLA_CI="$VALHALLA_URL" >> ~/.Renviron
65+ if [ "${RUNNER_OS}" = "Linux" ]; then
66+ echo 'VALHALLA_CI="http://localhost:8002"' >> ~/.Renviron
67+ fi
4768 shell : bash
4869
4970 - uses : r-lib/actions/setup-r-dependencies@v2
5576 with :
5677 upload-snapshots : true
5778 build_args : ' c("--no-manual","--compact-vignettes=gs+qpdf")'
79+
80+ - name : Stop Valhalla
81+ if : runner.os == 'Linux'
82+ run : |
83+ docker rm -f valhalla || true
Original file line number Diff line number Diff line change @@ -10,13 +10,11 @@ name: test-coverage
1010
1111permissions : read-all
1212
13-
1413jobs :
1514 test-coverage :
1615 runs-on : ubuntu-latest
1716 env :
1817 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
19- VALHALLA_URL : ${{ secrets.VALHALLA_URL }}
2018
2119 steps :
2220 - uses : actions/checkout@v4
2523 with :
2624 use-public-rspm : true
2725
26+ - name : Start Valhalla (Docker, Berlin)
27+ run : |
28+ set -eux
29+ DATA_DIR="${RUNNER_TEMP}/valhalla"
30+ mkdir -p "${DATA_DIR}"
31+
32+ docker run -dt --name valhalla -p 8002:8002 \
33+ -v "${DATA_DIR}:/custom_files" \
34+ -e tile_urls=https://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf \
35+ ghcr.io/valhalla/valhalla-scripted:latest
36+
37+ for i in {1..60}; do
38+ if curl -sf http://localhost:8002/status; then
39+ echo "Valhalla ready"; break
40+ fi
41+ sleep 2
42+ done
43+ shell : bash
44+
2845 - name : Create and populate .Renviron file
2946 run : |
30- echo VALHALLA_CI="$VALHALLA_URL" >> ~/.Renviron
47+ echo ' VALHALLA_CI="http://localhost:8002"' >> ~/.Renviron
3148 shell : bash
3249
3350 - uses : r-lib/actions/setup-r-dependencies@v2
6178 with :
6279 name : coverage-test-failures
6380 path : ${{ runner.temp }}/package
81+
82+ - name : Stop Valhalla
83+ if : runner.os == 'Linux'
84+ run : |
85+ docker rm -f valhalla || true
You can’t perform that action at this time.
0 commit comments