avoid database roundtrips for simple static select statements #163
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: Lint, format, and test | |
on: | |
push: | |
branches: | |
- 'main' | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
- '.github/workflows/release.yml' | |
- '.github/workflows/official-site.yml' | |
pull_request: | |
branches: | |
- 'main' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Free up disk space | |
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/share/boost "$AGENT_TOOLSDIRECTORY" /var/lib/apt/lists/* | |
- uses: actions/checkout@v3 | |
- name: Set up cargo cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: tests-${{ runner.os }}-check-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: tests-${{ runner.os }}-check- | |
- run: cargo fmt --all -- --check | |
- run: cargo clippy | |
- run: cargo test | |
- run: cargo test --all-features |