Skip to content

Commit 0abc0f1

Browse files
committed
Tune GH Actions
1 parent 6ad041a commit 0abc0f1

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

.github/workflows/rust_ci.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ env:
33
RUSTFLAGS: -Dwarnings
44
CARGO_TERM_COLOR: always
55
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6+
PG_VER: 17
67

78
on:
89
pull_request_target:
@@ -27,22 +28,26 @@ jobs:
2728
strategy:
2829
fail-fast: false
2930
matrix:
30-
os: [ubuntu-latest, macos-latest, windows-latest]
31+
# TODO: other OS
32+
os: [ubuntu-latest]
3133
action:
3234
- command: build
3335
args: --release
3436
- command: fmt
3537
args: --all -- --check
3638
- command: clippy
3739
args: --all-features --workspace
38-
- command: test
39-
args: --all-features --workspace
40+
- command: pgrx test
41+
args: --all-features
4042
steps:
41-
- name: Checkout Repository
42-
uses: actions/checkout@v4
43-
- name: Setup Rust Toolchain
44-
uses: actions-rust-lang/setup-rust-toolchain@v1
45-
- name: Enable Caching
46-
uses: Swatinem/rust-cache@v2
43+
- uses: actions/checkout@v4
44+
- uses: Swatinem/rust-cache@v2
45+
- uses: actions-rust-lang/setup-rust-toolchain@v1
46+
- name: Install PostgreSQL
47+
run: sudo apt install -y postgresql-server-dev-$PG_VER
48+
- name: Install cargo pgrx
49+
run: cargo install --path cargo-pgrx
50+
- name: cargo pgrx init
51+
run: cargo pgrx init "--pg$PG_VER=$(which pg_config)"
4752
- name: Run Command
48-
run: cargo ${{ matrix.action.command }} ${{ matrix.action.args }}
53+
run: cargo ${{ matrix.action.command }} ${{ matrix.action.args }} --runas postgres --pgdata=/tmp/pgdata

0 commit comments

Comments
 (0)