Skip to content

Commit

Permalink
Match only first pgrx in toml file
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Apr 4, 2024
1 parent 5b55250 commit 5315261
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install Postgres
run: sudo ./.ci/apt-install-postgres ${{ env.PGVERSION }}
- name: Install pgrx
run: cargo install cargo-pgrx --locked --version "$(perl -ne 'print $1 if /^pgrx\s+=\s"=?([^"]+)/' Cargo.toml)"
run: cargo install cargo-pgrx --locked --version "$(perl -ne '/^pgrx\s+=\s"=?([^"]+)/ && do { print $1; exit }' Cargo.toml)"
- name: Initialize pgrx
run: cargo pgrx init --pg${{ env.PGVERSION }}="$(which pg_config)"
- name: Cargo format
Expand All @@ -37,7 +37,8 @@ jobs:
os: [[🐧, Ubuntu]] # [🍎, macOS], [🪟, Windows]]
name: 🐘 Postgres ${{ matrix.pg }} on ${{ matrix.os[0] }} ${{ matrix.os[1] }}
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Postgres ${{ matrix.pg }}
Expand All @@ -47,7 +48,7 @@ jobs:
with: { cache-directories: /home/runner/.pgrx }
- run: env
- name: Install pgrx
run: cargo install cargo-pgrx --locked --version "$(perl -ne 'print $1 if /^pgrx\s+=\s"=?([^"]+)/' Cargo.toml)"
run: cargo install cargo-pgrx --locked --version "$(perl -ne '/^pgrx\s+=\s"=?([^"]+)/ && do { print $1; exit }' Cargo.toml)"
- name: Initialize pgrx
run: cargo pgrx init --pg${{ matrix.pg }}="$(which pg_config)"
- name: Run the tests
Expand Down

0 comments on commit 5315261

Please sign in to comment.