Skip to content

Commit ea565ce

Browse files
committed
fix: Fix test/build workflow. It doesn't do integration tests now
1 parent 49347d0 commit ea565ce

File tree

1 file changed

+35
-5
lines changed

1 file changed

+35
-5
lines changed

.github/workflows/build_test.yaml

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,43 @@ env:
99

1010
jobs:
1111
build_and_test:
12-
name: Rust project - latest
12+
name: etcd_fdw Build and Test
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16-
- run: rustup update stable && rustup default stable
17-
- run: cargo install cargo-pgrx --version 0.16.0
18-
- run: cargo build --verbose
19-
- run: cargo pgrx test --verbose
16+
17+
- name: Cache build/deps
18+
uses: actions/cache@v4
19+
with:
20+
path: |
21+
~/.cargo/bin/
22+
~/.cargo/registry/index/
23+
~/.cargo/registry/cache/
24+
~/.cargo/git/db/
25+
target/
26+
key: cargo-${{ hashFiles('**/Cargo.lock') }}
27+
28+
- name: Cache pgrx
29+
uses: actions/cache@v4
30+
with:
31+
path: |
32+
~/.pgrx/
33+
key: pgrx-0.16.0
34+
35+
- name: Install latest stable toolchain
36+
uses: actions-rs/toolchain@v1
37+
with:
38+
toolchain: stable
39+
override: true
40+
components: rustfmt, clippy
41+
- run: apt update
42+
- run: apt install build-essential bison flex clang protobuf-compiler -y
43+
- name: Create user
44+
run: |
45+
useradd -m test_user
46+
- run: sudo -u test_user cargo install cargo-pgrx --version 0.16.0
47+
- run: sudo -u test_user cargo pgrx init
48+
- run: sudo -u test_user cargo build --verbose
49+
- run: sudo -u test_user cargo test --verbose
2050

2151

0 commit comments

Comments
 (0)