Skip to content

Update to sqlx 0.8, eliminate most allocations #8

Update to sqlx 0.8, eliminate most allocations

Update to sqlx 0.8, eliminate most allocations #8

Workflow file for this run

name: Examples
on:
pull_request:
push:
branches:
- main
- '*-dev'
jobs:
mysql:
name: MySQL Example
runs-on: ubuntu-latest
services:
mysql:
image: mysql:latest
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: ormx
ports:
- 3307:3306
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
key: mysql-example
- name: Install sqlx-cli
run: |
cargo install sqlx-cli
sleep 5
- name: Setup
working-directory: example-mysql
env:
DATABASE_URL: mysql://root:password@localhost:3307/ormx?ssl-mode=disabled
run: sqlx db setup
- name: Run
working-directory: example-mysql
env:
DATABASE_URL: mysql://root:password@localhost:3307/ormx?ssl-mode=disabled
run: cargo run
mariadb:
name: MariaDB Example
runs-on: ubuntu-latest
services:
mysql:
image: mariadb:latest
env:
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
key: mariadb-example
- name: Install sqlx-cli
run: |
cargo install sqlx-cli
sleep 5
- name: Setup
working-directory: example-mariadb
env:
DATABASE_URL: mysql://root:password@localhost:3306/ormx?ssl-mode=disabled
run: sqlx db setup
- name: Run
working-directory: example-mariadb
env:
DATABASE_URL: mysql://root:password@localhost:3306/ormx?ssl-mode=disabled
run: cargo run
postgres:
name: PostgreSQL Example
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_PASSWORD: password
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
key: postgres-example
- name: Install sqlx-cli
run: cargo install sqlx-cli
- name: Setup
working-directory: example-postgres
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/ormx
run: sqlx db setup
- name: Run
working-directory: example-postgres
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/ormx
run: cargo run