diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml index 65ba264..dc145ac 100644 --- a/.github/workflows/lint-and-test.yml +++ b/.github/workflows/lint-and-test.yml @@ -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 @@ -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 }} @@ -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