Merge pull request #126 from rneswold/pull-request #237
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: CI | |
on: | |
workflow_call: | |
inputs: | |
rust-version: | |
type: string | |
required: false | |
default: stable | |
push: | |
branches: [ "main", "pr-*" ] | |
pull_request: | |
branches: [ "main", "pr-*" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
check: | |
strategy: | |
max-parallel: 1 | |
matrix: | |
backend: [simple-backend, redis-backend] | |
client: [no-client, graphql] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Set up cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: Lint | |
run: cargo fmt --all -- --check | |
- name: Run tests | |
run: cargo test --verbose --workspace --features ${{ matrix.client }},${{ matrix.backend }} |