@@ -24,15 +24,12 @@ jobs:
2424 - latest
2525 os :
2626 - ubuntu-latest
27- - macOS-latest
2827 - windows-latest
2928 arch :
3029 - x64
3130 - x86
32- exclude :
33- # Don't test 32-bit on macOS
34- - os : macOS-latest
35- arch : x86
31+ macos-postgresql-path :
32+ - /opt/homebrew/opt/postgresql
3633 include :
3734 # Add a LTS job just to make sure we still support it
3835 - os : ubuntu-latest
5653 version : 1
5754 arch : x64
5855 postgresql-version : ' 10'
56+ - os : macOS-latest
57+ version : 1
58+ arch : aarch64
59+ postgresql-version : ' 13'
60+ macos-postgresql-path : /opt/homebrew/var/postgresql
61+ - os : macOS-13
62+ version : 1
63+ arch : x64
64+ postgresql-version : ' 13'
65+ macos-postgresql-path : /usr/local/var/postgresql
5966 steps :
6067 - uses : actions/checkout@v2
6168 - uses : julia-actions/setup-julia@v1
@@ -96,13 +103,19 @@ jobs:
96103 run : echo "PGHOST=localhost" >> $GITHUB_ENV
97104 if : ${{ runner.os == 'Linux' }}
98105 # MacOS
106+ - name : Install PostgreSQL
107+ run : brew install postgresql@${{ matrix.postgresql-version }}
108+ if : ${{ runner.os == 'macOS' }}
109+ - name : Add PostgreSQL to Path
110+ run : echo "$(brew --prefix postgresql@${{matrix.postgresql-version }})/bin" >> $GITHUB_PATH
111+ if : ${{ runner.os == 'macOS' }}
99112 - name : Set PGUSER on macOS
100113 run : |
101114 echo "PGUSER=$USER" >> $GITHUB_ENV
102115 echo "LIBPQJL_DATABASE_USER=$USER" >> $GITHUB_ENV
103116 if : ${{ runner.os == 'macOS' }}
104117 - name : Start Homebrew PostgreSQL service
105- run : pg_ctl -D /usr/local/var/postgresql@$(psql --version | cut -f3 -d' ' | cut -f1 -d.) start
118+ run : pg_ctl -D ${{ matrix.macos-postgresql-path }}@${{ matrix.postgresql-version }} start
106119 if : ${{ runner.os == 'macOS' }}
107120 # Windows
108121 - name : Add PostgreSQL to Path
0 commit comments