Update GitHub Actions
This commit is contained in:
parent
09c328bb0d
commit
318fa9f9bf
130
.github/workflows/rust.yml
vendored
130
.github/workflows/rust.yml
vendored
@ -22,15 +22,6 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v1
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: >
|
|
||||||
--all
|
|
||||||
--exclude 'sea-orm-example-*'
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
@ -43,7 +34,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
os: [ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
@ -53,22 +44,20 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v1
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: install
|
command: install
|
||||||
args: >
|
args: >
|
||||||
--path sea-orm-cli
|
--path sea-orm-cli
|
||||||
|
|
||||||
sqlite:
|
compile:
|
||||||
name: SQLite
|
name: Compile
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
|
||||||
DATABASE_URL: "sqlite::memory:"
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
runtime: [async-std-native-tls, actix-native-tls, tokio-native-tls]
|
database: [sqlite, mysql, postgres]
|
||||||
|
runtime: [async-std, actix, tokio]
|
||||||
|
tls: [native-tls, rustls]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
@ -78,29 +67,67 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: actions/cache@v2
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
with:
|
||||||
command: build
|
path: |
|
||||||
args: >
|
~/.cargo/registry
|
||||||
--features default,runtime-${{ matrix.runtime }}
|
~/.cargo/git
|
||||||
|
Cargo.lock
|
||||||
|
target
|
||||||
|
key: ${{ runner.os }}-${{ matrix.database }}-${{ matrix.runtime }}-${{ matrix.tls }}
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: >
|
args: >
|
||||||
--features default,sqlx-sqlite,runtime-${{ matrix.runtime }}
|
--features default,sqlx-${{ matrix.database }},runtime-${{ matrix.runtime }}-${{ matrix.tls }}
|
||||||
|
--no-run
|
||||||
|
|
||||||
|
sqlite:
|
||||||
|
name: SQLite
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: compile
|
||||||
|
env:
|
||||||
|
DATABASE_URL: "sqlite::memory:"
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
runtime: [async-std, actix, tokio]
|
||||||
|
tls: [native-tls, rustls]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
Cargo.lock
|
||||||
|
target
|
||||||
|
key: ${{ runner.os }}-sqlite-${{ matrix.runtime }}-${{ matrix.tls }}
|
||||||
|
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: >
|
||||||
|
--features default,sqlx-sqlite,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
name: MySQL
|
name: MySQL
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
needs: compile
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: "mysql://root:@localhost"
|
DATABASE_URL: "mysql://root:@localhost"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
version: [8.0, 5.7]
|
version: [8.0, 5.7]
|
||||||
runtime: [async-std-native-tls, actix-native-tls, tokio-native-tls]
|
runtime: [async-std, actix, tokio]
|
||||||
|
tls: [native-tls, rustls]
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:${{ matrix.version }}
|
image: mysql:${{ matrix.version }}
|
||||||
@ -127,29 +154,32 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: actions/cache@v2
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
with:
|
||||||
command: build
|
path: |
|
||||||
args: >
|
~/.cargo/registry
|
||||||
--features default,runtime-${{ matrix.runtime }}
|
~/.cargo/git
|
||||||
|
Cargo.lock
|
||||||
|
target
|
||||||
|
key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ matrix.tls }}
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: >
|
args: >
|
||||||
--features default,sqlx-mysql,runtime-${{ matrix.runtime }}
|
--features default,sqlx-mysql,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
name: MariaDB
|
name: MariaDB
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
needs: compile
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: "mysql://root:@localhost"
|
DATABASE_URL: "mysql://root:@localhost"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
version: [10.6]
|
version: [10.6]
|
||||||
runtime: [async-std-native-tls, actix-native-tls, tokio-native-tls]
|
runtime: [async-std, actix, tokio]
|
||||||
|
tls: [native-tls, rustls]
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mariadb:${{ matrix.version }}
|
image: mariadb:${{ matrix.version }}
|
||||||
@ -176,29 +206,32 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: actions/cache@v2
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
with:
|
||||||
command: build
|
path: |
|
||||||
args: >
|
~/.cargo/registry
|
||||||
--features default,runtime-${{ matrix.runtime }}
|
~/.cargo/git
|
||||||
|
Cargo.lock
|
||||||
|
target
|
||||||
|
key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ matrix.tls }}
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: >
|
args: >
|
||||||
--features default,sqlx-mysql,runtime-${{ matrix.runtime }}
|
--features default,sqlx-mysql,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
name: Postgres
|
name: Postgres
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
needs: compile
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: "postgres://root:root@localhost"
|
DATABASE_URL: "postgres://root:root@localhost"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
version: [13.3, 12.7, 11.12, 10.17, 9.6.22]
|
version: [13.3, 12.7, 11.12, 10.17, 9.6.22]
|
||||||
runtime: [async-std-native-tls, actix-native-tls, tokio-native-tls]
|
runtime: [async-std, actix, tokio]
|
||||||
|
tls: [native-tls, rustls]
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:${{ matrix.version }}
|
image: postgres:${{ matrix.version }}
|
||||||
@ -222,16 +255,17 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: actions/cache@v2
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
with:
|
||||||
command: build
|
path: |
|
||||||
args: >
|
~/.cargo/registry
|
||||||
--features default,runtime-${{ matrix.runtime }}
|
~/.cargo/git
|
||||||
|
Cargo.lock
|
||||||
|
target
|
||||||
|
key: ${{ runner.os }}-postgres-${{ matrix.runtime }}-${{ matrix.tls }}
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: >
|
args: >
|
||||||
--features default,sqlx-postgres,runtime-${{ matrix.runtime }}
|
--features default,sqlx-postgres,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user