File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change 48
48
run : |
49
49
git submodule update --init --recursive
50
50
- 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
56
54
if : steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
57
55
run : |
58
56
curl https://sh.rustup.rs -sSf | sh -s -- -y
@@ -63,14 +61,22 @@ jobs:
63
61
cargo pgrx init
64
62
echo "shared_preload_libraries = 'pgml'" >> ~/.pgrx/data-16/postgresql.conf
65
63
fi
66
-
64
+ - name : Update extension
65
+ if : steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
66
+ run : |
67
+ git fetch
67
68
git checkout master
68
69
echo "\q" | cargo pgrx run
69
70
psql -p 28816 -h localhost -d pgml -P pager -c "CREATE EXTENSION pgml;"
70
71
git checkout $CI_BRANCH
71
72
echo "\q" | cargo pgrx run
72
73
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 : |
73
79
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
You can’t perform that action at this time.
0 commit comments