diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-06-06 13:03:42 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-06-06 13:03:42 +0300 |
commit | 0194c48d6c6a1fd0069721449c9cb842d5901677 (patch) | |
tree | c5448a8a54d094ee047f9dd3e06eaaf2cde3ae87 /.gitlab-ci.yml | |
parent | 2c3b53012ccc44bcef44d5cbda21b29d573e8d52 (diff) |
ci: Explicitly initialize Postgres database on macOS
With the move to M1-based macOS runners the Postgres database directory
is about to be moved. Instead of relying on any hardcoded locations,
let's convert the CI job to initialize our own database at a location
controlled by us.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 91a8cdd00..be27f8619 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -332,7 +332,7 @@ test:macos: variables: <<: *test_variables CACHE_PREFIX: macos-12-xcode-14 - PGDATA: /usr/local/var/postgres + PGDATA: /tmp/postgres PGHOST: localhost PGUSER: gitlab before_script: @@ -346,7 +346,8 @@ test:macos: - go version - pg_ctl --version - ulimit -n 4096 # The default of 256 can lead to 'too many open files' errors when running parallel tests - - pg_ctl -D /usr/local/var/postgres start > /tmp/postgres.log + - pg_ctl init + - pg_ctl start - pg_ctl status - createdb -U $PGUSER $POSTGRES_DB - make -j$(nproc) build prepare-tests |