Skip to content

Merge pull request #56 from kana-rus/add_realworld_example #444

Merge pull request #56 from kana-rus/add_realworld_example

Merge pull request #56 from kana-rus/add_realworld_example #444

Workflow file for this run

name: check
on:
pull_request:
push:
branches:
- main
jobs:
Check:
runs-on: ubuntu-latest
strategy:
matrix:
rt: ['tokio', 'async-std']
x: ['websocket', '']
toolchain: ['stable', 'nightly']
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.x == '' && '' || ',' }}${{ matrix.x }}${{ matrix.toolchain == 'nightly' && ',nightly' || '' }},DEBUG
- name: Check ohkami's buildability without default features except fot `utils`
run: cargo check --no-default-features --features utils,rt_${{ matrix.rt }}${{ matrix.x == '' && '' || ',' }}${{ matrix.x }}${{ matrix.toolchain == 'nightly' && ',nightly' || '' }},DEBUG
- name: Check ohkami's buildability without default features except fot `testing`
run: cargo check --no-default-features --features testing,rt_${{ matrix.rt }}${{ matrix.x == '' && '' || ',' }}${{ matrix.x }}${{ matrix.toolchain == 'nightly' && ',nightly' || '' }},DEBUG
- name: Check ohkami's buildability without default features
run: cargo check --no-default-features --features rt_${{ matrix.rt }}${{ matrix.x == '' && '' || ',' }}${{ matrix.x }}${{ matrix.toolchain == 'nightly' && ',nightly' || '' }},DEBUG
- 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