Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

sqld: Convert http api to axum #1842

sqld: Convert http api to axum

sqld: Convert http api to axum #1842

Workflow file for this run

name: Rust
on:
push:
branches: [ "main", "trying", "staging" ]
pull_request:
merge_group:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: --cfg=uuid_unstable
jobs:
checks:
runs-on: ubuntu-latest
name: Run Checks
env:
RUSTFLAGS: -D warnings --cfg=uuid_unstable
steps:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Check format
uses: actions-rs/cargo@v1
with:
command: check
args: --all-targets --all-features
clippy:
runs-on: ubuntu-latest
name: Run Clippy
steps:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features -- -D warnings
rust-fmt:
runs-on: ubuntu-latest
name: Run Rustfmt
steps:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
override: true
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Check format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --check
test:
runs-on: ubuntu-latest
name: Run Tests
services:
minio:
image: lazybit/minio
ports:
- 9000:9000
- 9090:9090
env:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
volumes:
- /data
options: --name=minio --health-cmd "curl http://localhost:9000/minio/health/live"
steps:
- name: Make some room available
run: "sudo rm -rf /usr/local/lib/android && sudo rm -rf /usr/share/dotnet"
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- name: Install minimal stable toolchain with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install foundationdb-clients
run: wget https://github.com/apple/foundationdb/releases/download/7.1.25/foundationdb-clients_7.1.25-1_amd64.deb && sudo dpkg -i foundationdb-clients_7.1.25-1_amd64.deb
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose
env:
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
AWS_DEFAULT_REGION: eu-central-2
LIBSQL_BOTTOMLESS_BUCKET: bottomless
LIBSQL_BOTTOMLESS_ENDPOINT: http://localhost:9000
check-openssl:
runs-on: ubuntu-latest
name: Check that we don't depend on openssl
steps:
- name: Install minimal stable toolchain with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Test openssl
shell: bash {0}
run: cargo tree -p sqld -i openssl; [ $? = 101 ]
docker:
runs-on: ubuntu-latest
name: Build Docker
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
uses: docker/build-push-action@v3
with:
context: .
tags: sqld:unstable