GitHub Workflow
This commit is contained in:
parent
3f7de132aa
commit
8cfa14233d
66
.github/workflows/rust.yml
vendored
66
.github/workflows/rust.yml
vendored
@ -10,6 +10,40 @@ env:
|
|||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
compile:
|
||||||
|
name: Compile
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
database: [sqlite, mysql, postgres]
|
||||||
|
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: ${{ github.sha }}-${{ github.run_id }}-${{ runner.os }}-${{ matrix.database }}-${{ matrix.runtime }}-${{ matrix.tls }}
|
||||||
|
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: >
|
||||||
|
--features default,sqlx-${{ matrix.database }},runtime-${{ matrix.runtime }}-${{ matrix.tls }}
|
||||||
|
--no-run
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Unit Test
|
name: Unit Test
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
@ -49,14 +83,12 @@ jobs:
|
|||||||
args: >
|
args: >
|
||||||
--path sea-orm-cli
|
--path sea-orm-cli
|
||||||
|
|
||||||
compile:
|
examples:
|
||||||
name: Compile
|
name: Examples
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
database: [sqlite, mysql, postgres]
|
os: [ubuntu-latest]
|
||||||
runtime: [async-std, actix, tokio]
|
|
||||||
tls: [native-tls, rustls]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
@ -66,33 +98,17 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
Cargo.lock
|
|
||||||
target
|
|
||||||
key: ${{ github.sha }}-${{ github.run_id }}-${{ runner.os }}-${{ matrix.database }}-${{ matrix.runtime }}-${{ matrix.tls }}
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: build
|
||||||
args: >
|
args: >
|
||||||
--features default,sqlx-${{ matrix.database }},runtime-${{ matrix.runtime }}-${{ matrix.tls }}
|
--manifest-path examples/async-std/Cargo.toml
|
||||||
--no-run
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: >
|
args: >
|
||||||
--path examples/async-std
|
--manifest-path examples/tokio/Cargo.toml
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: >
|
|
||||||
--path examples/tokio
|
|
||||||
|
|
||||||
sqlite:
|
sqlite:
|
||||||
name: SQLite
|
name: SQLite
|
||||||
|
Loading…
x
Reference in New Issue
Block a user