Skip to content

Commit ed322f8

Browse files
committed
Fix test workflow for mac
1 parent 8b4be64 commit ed322f8

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/test.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
required: false
1717
default: false
1818
jobs:
19-
ubuntu-build:
19+
test:
2020
runs-on: ${{ matrix.os }}
2121
strategy:
2222
fail-fast: false
@@ -29,7 +29,7 @@ jobs:
2929
submodules: "recursive"
3030
- name: Build
3131
id: build
32-
run: sudo su -c "PG_VERSION=$PG_VERSION USE_SOURCE=1 GITHUB_OUTPUT=$GITHUB_OUTPUT ENABLE_COVERAGE=1 ./ci/scripts/build.sh"
32+
run: sudo sh -c "PG_VERSION=$PG_VERSION USE_SOURCE=1 GITHUB_OUTPUT=$GITHUB_OUTPUT ENABLE_COVERAGE=1 ./ci/scripts/build.sh"
3333
env:
3434
PG_VERSION: ${{ matrix.postgres }}
3535
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
@@ -45,7 +45,7 @@ jobs:
4545
if: ${{ startsWith(matrix.os, 'ubuntu') }}
4646
- name: Run tests mac
4747
id: test-mac
48-
run: sudo su postgres -c "PG_VERSION=$PG_VERSION ./ci/scripts/run-tests-mac.sh"
48+
run: ./ci/scripts/run-tests-mac.sh
4949
env:
5050
PG_VERSION: ${{ matrix.postgres }}
5151
if: ${{ startsWith(matrix.os, 'mac') }}

ci/scripts/build-mac.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function package_if_necessary() {
2424
}
2525

2626
function cleanup_environment() {
27-
: # nop
27+
# Add permission to for running tests from runner user
28+
chmod -R 777 /tmp/lantern
2829
}
2930

ci/scripts/run-tests-mac.sh

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set -e
33

44
WORKDIR=/tmp/lantern
55
PG_VERSION=${PG_VERSION:-15}
6+
export PATH="/usr/local/opt/postgresql@${PG_VERSION}/bin:$PATH"
67

78
wait_for_pg(){
89
tries=0

0 commit comments

Comments
 (0)