diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml index 7d305c5..a7510de 100644 --- a/.github/workflows/lint-and-test.yml +++ b/.github/workflows/lint-and-test.yml @@ -8,6 +8,7 @@ jobs: lint: name: 🔎 Lint Code runs-on: ubuntu-latest + env: { PGVERSION: 16 } steps: - name: Checkout uses: actions/checkout@v4 @@ -21,16 +22,16 @@ jobs: uses: Swatinem/rust-cache@v2 with: { cache-directories: /home/runner/.pgrx } - name: Install Postgres - run: sudo ./.ci/apt-install-postgres 16 + 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)" - name: Initialize pgrx # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#postgresql - run: cargo pgrx init --pg16="$(which pg_config)" + run: cargo pgrx init --pg${{ env.PGVERSION }}="$(which pg_config)" - name: Cargo format run: cargo fmt --all --check - name: Clippy - run: cargo clippy --features pg14 --no-default-features + run: cargo clippy --features pg${{ env.PGVERSION }} --no-default-features test: runs-on: ubuntu-latest