Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Montana/workflow#1340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
montanalow merged 23 commits intomasterfrommontana/workflow
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
23 commits
Select commitHold shift + click to select a range
b4d6a72
fix tests
montanalowMar 1, 2024
1ae938c
try fetching first
montanalowMar 1, 2024
8e1c0b4
order
montanalowMar 1, 2024
16add56
full diff
montanalowMar 1, 2024
3015dde
fetch first
montanalowMar 1, 2024
0fc41af
v4
montanalowMar 1, 2024
9a3b757
v4
montanalowMar 1, 2024
be2f43f
master
montanalowMar 1, 2024
008f5a5
ambigous
montanalowMar 1, 2024
ea643b9
more origin
montanalowMar 1, 2024
667ac99
pgrx
montanalowMar 1, 2024
99a431b
split
montanalowMar 1, 2024
5986bc6
drop extension
montanalowMar 1, 2024
467f459
more sql
montanalowMar 1, 2024
8333e38
add schema
montanalowMar 1, 2024
9aacf3b
add schema
montanalowMar 1, 2024
c225c76
add schema
montanalowMar 1, 2024
4e8da56
cache buster
montanalowMar 1, 2024
08b6b47
start/stop
montanalowMar 1, 2024
e43af5c
logs
montanalowMar 1, 2024
69173ec
or
montanalowMar 1, 2024
61c3a5a
run starts/stops the server
montanalowMar 1, 2024
3548698
cargo pgrx test leaves a test only version of the extension
montanalowMar 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 24 additions & 22 deletions.github/workflows/ci.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,14 +9,17 @@ jobs:
run:
working-directory: pgml-extension
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
submodules: 'recursive'
- name: Fetch master
run: |
git fetch origin master --depth 1
- name: Changed files in pgml-extension
id: pgml_extension_changed
run: |
echo "PGML_EXTENSION_CHANGED_FILES=$(git diff --name-only HEADHEAD~1 . | wc -l)" >> $GITHUB_OUTPUT
- name:Install dependencies
echo "PGML_EXTENSION_CHANGED_FILES=$(git diff --name-only HEADorigin/master . | wc -l)" >> $GITHUB_OUTPUT
- name:System dependencies
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
run: |
sudo apt-get update && \
Expand All@@ -42,17 +45,8 @@ jobs:
~/.cargo
pgml-extension/target
~/.pgrx
key: ${{ runner.os }}-rust-1.74-${{ hashFiles('pgml-extension/Cargo.lock') }}
- name: Submodules
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
run: |
git submodule update --init --recursive
- name: Get current version
id: current-version
run: echo "CI_BRANCH=$(git name-rev --name-only HEAD)" >> $GITHUB_OUTPUT
- name: Run tests
env:
CI_BRANCH: ${{ steps.current-version.outputs.CI_BRANCH }}
key: ${{ runner.os }}-rust-1.74-${{ hashFiles('pgml-extension/Cargo.lock') }}-bust2
- name: Install pgrx
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
Expand All@@ -61,15 +55,23 @@ jobs:

if [[ ! -d ~/.pgrx ]]; then
cargo pgrx init
echo "shared_preload_libraries = 'pgml'" >> ~/.pgrx/data-16/postgresql.conf
fi

git checkout master
- name: Update extension test
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
run: |
git checkout origin/master
echo "\q" | cargo pgrx run
psql -p 28816 -h localhost -d pgml -P pager -c "CREATE EXTENSION pgml;"
git checkout $CI_BRANCH
psql -p 28816 -h localhost -d pgml -P pager -c "DROP EXTENSION IF EXISTS pgml CASCADE; DROP SCHEMA IF EXISTS pgml CASCADE;CREATE EXTENSION pgml;"
git checkout $GITHUB_SHA
echo "\q" | cargo pgrx run
psql -p 28816 -h localhost -d pgml -P pager -c "ALTER EXTENSION pgml UPDATE;"
- name: Unit tests
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
run: |
cargo pgrx test
# cargo pgrx start
# psql -p 28815 -h 127.0.0.1 -d pgml -P pager -f tests/test.sql
# cargo pgrx stop
- name: Integration tests
if: steps.pgml_extension_changed.outputs.PGML_EXTENSION_CHANGED_FILES != '0'
run: |
echo "\q" | cargo pgrx run
psql -p 28816 -h 127.0.0.1 -d pgml -P pager -f tests/test.sql
2 changes: 1 addition & 1 deletionpgml-extension/sql/setup_examples.sql
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@
--- Usage:
---
--- $ cargo pgrx run --release
--- $ psql -P pager-off -h localhost -p28813 -d pgml -f sql/setup_examples.sql
--- $ psql -P pager-off -h localhost -p28816 -d pgml -f sql/setup_examples.sql
---
-- \set ON_ERROR_STOP true
\timing on
Expand Down
4 changes: 3 additions & 1 deletionpgml-extension/src/orm/snapshot.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -749,7 +749,9 @@ impl Snapshot {
self.relation_name_quoted()
)
}
false => self.test_sampling.get_sql(&self.relation_name_quoted(), self.columns.clone()),
false => self
.test_sampling
.get_sql(&self.relation_name_quoted(), self.columns.clone()),
}
}

Expand Down
2 changes: 1 addition & 1 deletionpgml-extension/tests/test.sql
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@
--- Usage:
---
--- $ cargo pgrx run --release
--- $ psql -h localhost -p28815 -d pgml -f tests/test.sql -P pager
--- $ psql -h localhost -p28816 -d pgml -f tests/test.sql -P pager
---
\set ON_ERROR_STOP true
\timing on
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp