Merge pull request #17 from aaiyer/main #175
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: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_and_test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- run: rustup toolchain install 1.70.0 | |
- run: rustup override set 1.70.0 | |
- run: rustup component add rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- run: rustc --version | |
- name: Build debug | |
run: cargo build --verbose | |
- name: Build release | |
run: cargo build --verbose --release | |
- name: Run tests no default features | |
run: cargo test --no-default-features | |
- name: Run tests | |
run: cargo test | |
test_mysql: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- run: rustup toolchain install 1.70.0 | |
- run: rustup override set 1.70.0 | |
- run: rustup component add rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install --yes libmysqlclient-dev | |
- run: rustc --version | |
- name: Run tests | |
run: cargo test -F build-with-mysql | |
test_postgresql: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- run: rustup toolchain install 1.70.0 | |
- run: rustup override set 1.70.0 | |
- run: rustup component add rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install --yes libpq-dev | |
- run: rustc --version | |
- name: Run tests | |
run: cargo test -F build-with-postgres | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: Swatinem/rust-cache@v2 | |
- name: Lint | |
run: cargo clippy | |
- name: Format | |
run: cargo fmt --check |