Skip to content

👷 Add macos-latest build to CI #61

👷 Add macos-latest build to CI

👷 Add macos-latest build to CI #61

Workflow file for this run

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
- uses: Swatinem/rust-cache@v2
- 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
- uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes libmysqlclient-dev
- name: Run tests
run: cargo test -F build-with-mysql
test_postgresql:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes libpq-dev
- 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