Merge pull request #79 from kana-rus/reorganize_dir_structure #517
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: check | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
Check: | |
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: Check ohkami's buildability | |
run: cargo check --features rt_${{ matrix.rt }}${{ matrix.custom-header && ',custom-header' || '' }} | |
- name: Check ohkami's buildability without default features except fot `utils` | |
run: cargo check --no-default-features --features utils,rt_${{ matrix.rt }}${{ matrix.custom-header && ',custom-header' || '' }} | |
- name: Check ohkami's buildability without default features except fot `testing` | |
run: cargo check --no-default-features --features testing,rt_${{ matrix.rt }}${{ matrix.custom-header && ',custom-header' || '' }} | |
- name: Check ohkami's buildability without default features | |
run: cargo check --no-default-features --features rt_${{ matrix.rt }}${{ matrix.custom-header && ',custom-header' || '' }} | |
- 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: Check examples' buildablity | |
working-directory: examples | |
run: | | |
docker-compose -f ./realworld/docker-compose.yml up -d | |
cd ./realworld && sqlx migrate run | |
cargo check |