From c37cc9960dc6f07202a99ef0206a3d00cc853009 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Sun, 7 Jun 2020 05:37:49 -0700 Subject: [PATCH] test: add remaining databases to core workflow --- .github/workflows/sqlx.yml | 133 ++++++++++++++++++++++++++++++++++++- 1 file changed, 130 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sqlx.yml b/.github/workflows/sqlx.yml index d31ed82ac..2005b5145 100644 --- a/.github/workflows/sqlx.yml +++ b/.github/workflows/sqlx.yml @@ -76,13 +76,35 @@ jobs: --manifest-path sqlx-core/Cargo.toml --features offline,all-databases,all-types + sqlite: + name: SQLite + runs-on: ubuntu-20.04 + strategy: + matrix: + runtime: [async-std, tokio, actix] + needs: check + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - uses: actions-rs/cargo@v1 + with: + command: test + args: > + --features sqlite,all-types,runtime-${{ matrix.runtime }} + postgres: name: Postgres runs-on: ubuntu-20.04 strategy: matrix: - runtime: [async-std, tokio, actix] postgres: [12, 10, 9_6, 9_5] + runtime: [async-std, tokio, actix] needs: check steps: - uses: actions/checkout@v2 @@ -107,7 +129,7 @@ jobs: command: test args: > --no-default-features - --features postgres,all-types,runtime-${{ matrix.runtime }} + --features postgres,macros,all-types,runtime-${{ matrix.runtime }} env: DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx @@ -116,6 +138,111 @@ jobs: command: test args: > --no-default-features - --features postgres,all-types,runtime-${{ matrix.runtime }} + --features postgres,macros,all-types,runtime-${{ matrix.runtime }} env: DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx?sslmode=verify-ca&sslrootcert=.%2Ftests%2Fcerts%2Fca.crt + + mysql: + name: MySQL + runs-on: ubuntu-20.04 + strategy: + matrix: + mysql: [8, 5_7, 5_6] + runtime: [async-std, tokio, actix] + needs: check + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - uses: actions-rs/cargo@v1 + with: + command: build + args: > + --features mysql,all-types + + - run: docker-compose -f tests/docker-compose.yml run -d -p 5432:5432 mysql_${{ matrix.mysql }} + - run: sleep 30 + + - uses: actions-rs/cargo@v1 + with: + command: test + args: > + --no-default-features + --features mysql,macros,all-types,runtime-${{ matrix.runtime }} + env: + DATABASE_URL: mysql://root:password@localhost:5432/sqlx + + mariadb: + name: MariaDB + runs-on: ubuntu-20.04 + strategy: + matrix: + mariadb: [10_5, 10_4, 10_3, 10_2, 10_1] + runtime: [async-std, tokio, actix] + needs: check + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - uses: actions-rs/cargo@v1 + with: + command: build + args: > + --features mysql,all-types + + - run: docker-compose -f tests/docker-compose.yml run -d -p 5432:5432 mariadb_${{ matrix.mariadb }} + - run: sleep 30 + + - uses: actions-rs/cargo@v1 + with: + command: test + args: > + --no-default-features + --features mysql,macros,all-types,runtime-${{ matrix.runtime }} + env: + DATABASE_URL: mysql://root:password@localhost:5432/sqlx + + mssql: + name: MSSQL + runs-on: ubuntu-20.04 + strategy: + matrix: + mariadb: [2019, 2017] + runtime: [async-std, tokio, actix] + needs: check + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - uses: actions-rs/cargo@v1 + with: + command: build + args: > + --features mssql,all-types + + - run: docker-compose -f tests/docker-compose.yml run -d -p 1433:1433 mssql_${{ matrix.mssql }} + - run: sleep 80 # MSSQL takes a "bit" to startup + + - uses: actions-rs/cargo@v1 + with: + command: test + args: > + --no-default-features + --features mssql,macros,all-types,runtime-${{ matrix.runtime }} + env: + DATABASE_URL: mssql://sa:Password123!@localhost/sqlx