|
55 | 55 | run: | |
56 | 56 | brew install unixodbc |
57 | 57 | shell: bash |
| 58 | + |
| 59 | + # The duckdb test source connects with a bare `duckdb::duckdb()`, |
| 60 | + # which leaves it to the package to pick where downloaded extensions |
| 61 | + # and stored secrets live. |
| 62 | + # Whenever the package picks by itself it announces the location: |
| 63 | + # a missing `~/.duckdb` draws the long "temporary directory" notice, |
| 64 | + # and a bare `~/.duckdb` still draws a shorter "storing under ~/.duckdb" one |
| 65 | + # (see `?duckdb_storage`). |
| 66 | + # Both are noise in CI, and both can leak into test output. |
| 67 | + # |
| 68 | + # So create the shared home -- the same directory the duckdb repo creates in |
| 69 | + # its own CI -- and additionally point `DUCKDB_R_HOME` at it. |
| 70 | + # The environment variable counts as an explicit choice, |
| 71 | + # so duckdb resolves to that directory without announcing anything, |
| 72 | + # while the directory itself keeps extensions in one place for the whole run. |
| 73 | + # duckdb derives the home from `USERPROFILE` on Windows and `HOME` elsewhere, |
| 74 | + # so match that here rather than relying on shell `~` expansion. |
| 75 | + - name: Create the shared DuckDB home (~/.duckdb) |
| 76 | + run: | |
| 77 | + if [ "${RUNNER_OS}" = "Windows" ]; then |
| 78 | + home="$(cygpath -u "${USERPROFILE}")" |
| 79 | + else |
| 80 | + home="${HOME}" |
| 81 | + fi |
| 82 | + mkdir -p "${home}/.duckdb" |
| 83 | + duckdb_home="${home}/.duckdb" |
| 84 | + if [ "${RUNNER_OS}" = "Windows" ]; then |
| 85 | + duckdb_home="$(cygpath -w "${duckdb_home}")" |
| 86 | + fi |
| 87 | + echo "DUCKDB_R_HOME=${duckdb_home}" | tee -a "$GITHUB_ENV" |
| 88 | + shell: bash |
0 commit comments