Reorganize dir structure #581
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
Test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rt: ['tokio', 'async-std'] | |
toolchain: ['stable', 'nightly'] | |
custom-header: [true, false] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
profile: minimal | |
override: true | |
- name: Run ohkami's doc tests | |
if: matrix.rt == 'tokio' | |
run: cargo test --doc --features rt_${{ matrix.rt }},DEBUG${{ matrix.custom-header && ',custom-header' || '' }} | |
- name: Run ohkami's lib tests | |
run: cargo test --lib --features rt_${{ matrix.rt }},DEBUG${{ matrix.custom-header && ',custom-header' || '' }} | |
- name: Run ohkami's lib tests without default features except fot `utils` | |
run: cargo test --lib --no-default-features --features utils,rt_${{ matrix.rt }},DEBUG${{ matrix.custom-header && ',custom-header' || '' }} | |
- name: Run ohkami's lib tests without default features except fot `testing` | |
run: cargo test --lib --no-default-features --features testing,rt_${{ matrix.rt }},DEBUG${{ matrix.custom-header && ',custom-header' || '' }} | |
- name: Run ohkami's lib tests without default features | |
run: cargo test --lib --no-default-features --features rt_${{ matrix.rt }},DEBUG${{ matrix.custom-header && ',custom-header' || '' }} | |
- name: Run ohkami's benchmark | |
if: matrix.toolchain == 'nightly' | |
working-directory: benches | |
run: cargo bench | |
- name: Cache cargo tools | |
id: cache_cargo_tools | |
uses: actions/cache@v3 | |
with: | |
key: ${{ runner.os }}-cargo-install | |
path: ~/.cargo/bin | |
- name: Install cargo tools | |
if: ${{ steps.cache_cargo_tools.outputs.cache-hit != 'true' }} | |
run: | | |
cargo install sqlx-cli --no-default-features --features native-tls,postgres | |
- name: Run tests of examples | |
working-directory: examples | |
run: | | |
docker-compose -f ./realworld/docker-compose.yml up -d | |
cd ./realworld && sqlx migrate run | |
cargo test |