Skip to content

Commit 1ae938c

Browse files
committed
try fetching first
1 parent b4d6a72 commit 1ae938c

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,9 @@ jobs:
4848
run: |
4949
git submodule update --init --recursive
5050
- name: Get current version
51-
id: current-version
52-
run: echo "CI_BRANCH=$(git name-rev --name-only HEAD)" >> $GITHUB_OUTPUT
53-
- name: Run tests
54-
env:
55-
CI_BRANCH: ${{ steps.current-version.outputs.CI_BRANCH }}
51+
id: current_version
52+
run: echo "CI_BRANCH=$(git name-rev --name-only HEAD)" >> $GITHUB_OUTPUT
53+
- name: Install Dependencies
5654
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
5755
run: |
5856
curl https://sh.rustup.rs -sSf | sh -s -- -y
@@ -63,14 +61,22 @@ jobs:
6361
cargo pgrx init
6462
echo "shared_preload_libraries = 'pgml'" >> ~/.pgrx/data-16/postgresql.conf
6563
fi
66-
64+
- name: Update extension
65+
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
66+
run: |
67+
git fetch
6768
git checkout master
6869
echo "\q" | cargo pgrx run
6970
psql -p 28816 -h localhost -d pgml -P pager -c "CREATE EXTENSION pgml;"
7071
git checkout $CI_BRANCH
7172
echo "\q" | cargo pgrx run
7273
psql -p 28816 -h localhost -d pgml -P pager -c "ALTER EXTENSION pgml UPDATE;"
74+
- name: Run tests
75+
env:
76+
CI_BRANCH: ${{ steps.current_version.outputs.CI_BRANCH }}
77+
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
78+
run: |
7379
cargo pgrx test
74-
# cargo pgrx start
75-
# psql -p 28815 -h 127.0.0.1 -d pgml -P pager -f tests/test.sql
76-
# cargo pgrx stop
80+
cargo pgrx start
81+
psql -p 28815 -h 127.0.0.1 -d pgml -P pager -f tests/test.sql
82+
cargo pgrx stop

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy