Skip to content

Commit a881e1a

Browse files
committed
fix: Skip steps on cache hit
1 parent 8101f83 commit a881e1a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/build_test.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616

1717
- name: Cache build/deps
1818
uses: actions/cache@v4
19+
id: cache_deps
1920
with:
2021
path: |
2122
~/.cargo/bin/
@@ -27,6 +28,7 @@ jobs:
2728

2829
- name: Cache pgrx
2930
uses: actions/cache@v4
31+
id: cache_pgrx
3032
with:
3133
path: |
3234
~/.pgrx/
@@ -38,10 +40,15 @@ jobs:
3840
toolchain: stable
3941
override: true
4042
components: rustfmt, clippy
41-
- run: sudo apt install build-essential bison flex clang protobuf-compiler libreadline8 libreadline-dev -y
42-
- run: cargo install cargo-pgrx --version 0.16.0 --locked
43+
- name: Install debian deps
44+
run: sudo apt install build-essential bison flex clang protobuf-compiler libreadline8 libreadline-dev -y
45+
- name: Install pgrx
46+
run: cargo install cargo-pgrx --version 0.16.0 --locked
47+
if: steps.cache_pgrx.outputs.cache-hit != 'true'
4348
- run: cargo pgrx init
49+
if: steps.cache_pgrx.outputs.cache-hit != 'true'
4450
- run: cargo build --verbose
51+
if: steps.cache_deps.outputs.cache-hit != 'true'
4552
- run: cargo test --verbose
4653
- run: cargo pgrx test --verbose
4754

0 commit comments

Comments
 (0)