Skip to content

Merge branch 'main' of github.com:TimelordUK/sql-cli #256

Merge branch 'main' of github.com:TimelordUK/sql-cli

Merge branch 'main' of github.com:TimelordUK/sql-cli #256

Workflow file for this run

name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.os }}-cargo-
- name: Cache cargo build
uses: actions/cache@v4
with:
path: sql-cli/target
key: ${{ runner.os }}-${{ matrix.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.os }}-cargo-build-
- name: Build
working-directory: ./sql-cli
run: cargo build --verbose
- name: Run tests
working-directory: ./sql-cli
run: cargo test --verbose
- name: Run clippy
working-directory: ./sql-cli
run: cargo clippy -- -W warnings
- name: Check formatting
working-directory: ./sql-cli
run: cargo fmt -- --check