Skip to content

Commit

Permalink
[github-action] Uses ikalnytskyi/action-setup-postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
sanpii committed Aug 21, 2024
1 parent 2da9f3d commit 0b8018a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 61 deletions.
56 changes: 5 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,6 @@ jobs:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
pg: ["10", "11", "12", "13", "14", "15", "16"]
mode: ["debug", "release"]
exclude:
- os: "macos-latest"
pg: "10"
- os: "macos-latest"
pg: "11"
- os: "macos-latest"
pg: "12"
- os: "macos-latest"
pg: "13"
- os: "macos-latest"
pg: "15"
- os: "macos-latest"
pg: "16"
- os: "windows-latest"
pg: "11"
- os: "windows-latest"
pg: "12"
- os: "windows-latest"
pg: "13"
- os: "windows-latest"
pg: "14"
- os: "windows-latest"
pg: "15"
- os: "windows-latest"
pg: "16"
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -70,32 +45,11 @@ jobs:
with:
toolchain: ${{ matrix.rust }}

- name: Install postgreSQL (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt install bc sudo postgresql-${{ matrix.pg }} postgresql-server-dev-${{ matrix.pg }} clang valgrind -y
sudo service postgresql start && sleep 3
sudo -u postgres psql --command "ALTER USER postgres PASSWORD 'root';"
- name: Install postgreSQL (MacOS)
if: matrix.os == 'macos-latest'
run: |
PG_SERVICE=$(brew services list | grep -oe "postgresql\S*")
brew services start $PG_SERVICE
sleep 3
BINDIR=$(pg_config --bindir)
$BINDIR/createuser --superuser postgres
psql --username postgres --command "ALTER USER postgres PASSWORD 'root';"
- name: Install postgres (Windows)
if: matrix.os == 'windows-latest'
shell: bash
run: |
choco install postgresql${{ matrix.pg }} --force --params '/Password:root'
echo "PQ_LIB_DIR=C:\Program Files\PostgreSQL\${{ matrix.pg }}\lib" >> $GITHUB_ENV
- uses: ikalnytskyi/action-setup-postgres@v6
with:
username: postgres
password: root
postgres-version: ${{ matrix.pg }}

- name: Sets feature variable
shell: bash
Expand Down
11 changes: 1 addition & 10 deletions src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,16 +453,7 @@ mod test {
fn ssl_attribute_names() {
let conn = crate::test::new_conn();

assert_eq!(
conn.ssl_attribute_names(),
Ok(vec![
crate::ssl::Attribute::Library,
crate::ssl::Attribute::KeyBits,
crate::ssl::Attribute::Cipher,
crate::ssl::Attribute::Compression,
crate::ssl::Attribute::Protocol,
])
);
assert!(conn.ssl_attribute_names().is_ok());
}

#[test]
Expand Down

0 comments on commit 0b8018a

Please sign in to comment.