Skip to content

Commit

Permalink
change database driver and rework error (#3)
Browse files Browse the repository at this point in the history
- change to a tokio-rusqlite derivative.
- update to hyper 1.0
- update rust version
  • Loading branch information
seddonm1 authored Aug 11, 2024
1 parent 0b92657 commit 18057a9
Show file tree
Hide file tree
Showing 17 changed files with 1,452 additions and 1,019 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.74.0
FROM rust:1.80.1

RUN rustup component add rustfmt &&\
rustup component add clippy
rustup component add clippy
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"extensions": [
"rust-lang.rust-analyzer",
"vadimcn.vscode-lldb",
"bungcip.better-toml",
"serayuzgur.crates"
"bungcip.even-better-toml",
"fill-labs.dependi"
]
}
}
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: Build and publish a Docker image to ghcr.io
on:
release:
types: [ published ]
types: [published]

jobs:
docker_publish:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
- name: "Checkout GitHub Action"
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
Expand All @@ -21,17 +27,18 @@ jobs:
- name: Login to image repository
if: github.ref_type == 'tag'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.PACKAGES_GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
42 changes: 6 additions & 36 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Tests
on: [push, pull_request]

Expand All @@ -33,42 +16,29 @@ jobs:
# "1" means line tables only, which is useful for panic tracebacks.
RUSTFLAGS: "-C debuginfo=1"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- name: Cache Cargo
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /home/runner/.cargo
key: cargo-cache-
- name: Cache Rust dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /home/runner/target
key: target-cache-
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt
rustup component add clippy
- name: Run tests
run: |
cargo test
fmt:
name: Rust formatting
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64]
rust: [stable]
steps:
- uses: actions/checkout@v2
- name: Setup toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt
rustup component add clippy
- name: Run
- name: Run format
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-targets --workspace -- -D warnings
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.0] - 2024-03-02

- Replace deadpool-sqlite with a connector based on tokio-rusqlite.
- Rework error system.

## [0.3.3] - 2023-10-08

## Changed
Expand Down
Loading

0 comments on commit 18057a9

Please sign in to comment.