Skip to content

Commit

Permalink
test: add remaining databases to core workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mehcode committed Jun 7, 2020
1 parent c9eef8b commit c37cc99
Showing 1 changed file with 130 additions and 3 deletions.
133 changes: 130 additions & 3 deletions .github/workflows/sqlx.yml
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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

0 comments on commit c37cc99

Please sign in to comment.