mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-13 17:27:50 +00:00
Try a different health check for MariaDB
This commit is contained in:
parent
cec532acb1
commit
77fbe3dd9e
2
.github/workflows/mariadb.yml
vendored
2
.github/workflows/mariadb.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
# will assign a random free host port
|
||||
- 3306/tcp
|
||||
# needed because the container does not provide a healthcheck
|
||||
options: --health-cmd "mysql --user=root --password=$MYSQL_PASSWORD -e 'show databases;'" --health-interval 30s --health-timeout 30s --health-retries 10
|
||||
options: --health-cmd "mysqladmin ping --silent" --health-interval 30s --health-timeout 30s --health-retries 10
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
55
.github/workflows/mysql.yml
vendored
Normal file
55
.github/workflows/mysql.yml
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
name: MySQL
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
mysql: [5.7.28, 8.0.18]
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:${{ matrix.mysql }}
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
MYSQL_DATABASE: sqlx
|
||||
ports:
|
||||
# will assign a random free host port
|
||||
- 3306/tcp
|
||||
# needed because the container does not provide a healthcheck
|
||||
options: --health-cmd "mysqladmin ping --silent" --health-interval 30s --health-timeout 30s --health-retries 10
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
key: ${{ runner.os }}-mysql-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/git
|
||||
key: ${{ runner.os }}-mysql-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: target
|
||||
key: ${{ runner.os }}-mysql-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Setup rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- run: cargo test -p sqlx --no-default-features --features 'mysql macros chrono'
|
||||
env:
|
||||
DATABASE_URL: mysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/sqlx
|
||||
Loading…
x
Reference in New Issue
Block a user