Skip to content

Bump uuid from 1.23.3 to 1.23.4 in the cargo-dependencies group #1012

Bump uuid from 1.23.3 to 1.23.4 in the cargo-dependencies group

Bump uuid from 1.23.3 to 1.23.4 in the cargo-dependencies group #1012

Workflow file for this run

name: Checks
permissions:
contents: read
on:
pull_request:
merge_group:
branches:
- main
jobs:
build:
name: Build and test
runs-on: "${{ matrix.os }}"
strategy:
matrix:
include:
- rust: "stable"
target: "x86_64-unknown-linux-gnu"
os: ubuntu-latest
features: "--all-features"
- rust: "msrv"
target: "x86_64-unknown-linux-gnu"
os: ubuntu-latest
features: "--all-features"
- rust: "stable"
target: "x86_64-unknown-linux-musl"
os: ubuntu-latest
features: "--all-features"
packages: musl-dev
- rust: "stable"
target: "aarch64-unknown-linux-gnu"
os: ubuntu-24.04-arm
features: "--all-features"
- rust: "stable"
target: "x86_64-unknown-linux-gnu"
os: ubuntu-latest
features: "--no-default-features --features=postgres,live-db-test,vendored-ssl"
steps:
- name: Checkout sources
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y postgresql-client ${{matrix.packages}}
- name: Set target rust version
run: echo "TARGET_RUST_VERSION=$(if [ "${{matrix.rust}}" = "msrv" ]; then grep rust-version Cargo.toml | grep MSRV | cut -d'"' -f2; else echo "${{matrix.rust}}"; fi)" >> $GITHUB_ENV
- name: Install toolchain
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
with:
toolchain: "${TARGET_RUST_VERSION}"
targets: "${{ matrix.target }}"
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@9e1e5806d4a4822de933115878265be9aaa786d9 # v2.82.2
with:
tool: cargo-llvm-cov
- name: Rust cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
shared-key: "${{matrix.rust}}-${{matrix.target}}"
cache-on-failure: true
prefix-key: 'checks'
- name: Install Nextest
run: cargo install --locked cargo-nextest
- name: Setup Postgres DB and MQTT server
run: |
docker compose up db mqtt --wait && \
cargo install sqlx-cli --version 0.8.6 --no-default-features --features postgres && \
cargo sqlx migrate run --source openleadr-vtn/migrations && \
psql -v ON_ERROR_STOP=1 postgresql://openadr:openadr@localhost:5432/openadr < fixtures/users.sql
- name: cargo build
run: cargo build ${{ matrix.features }}
- name: Run tests
run: cargo llvm-cov nextest --max-fail=10 --target ${{matrix.target}} ${{ matrix.features }} --lcov --output-path lcov.info
env:
RUST_BACKTRACE: 1
- name: Bring Postgres DB down
run: docker compose down
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
files: lcov.info
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
unused:
name: Check unused dependencies
runs-on: ubuntu-latest
env:
SQLX_OFFLINE: true
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
with:
toolchain: nightly
- name: Install udeps
uses: taiki-e/install-action@9e1e5806d4a4822de933115878265be9aaa786d9 # v2.82.2
with:
tool: cargo-udeps
- name: cargo udeps
run: cargo udeps --workspace --all-targets --all-features
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
with:
toolchain: nightly
components: rustfmt
- name: Check formatting
run: cargo +nightly fmt --all --check -- --config imports_granularity="Crate"
clippy:
name: Clippy
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
use_zig: false
zig_args: ""
- target: aarch64-unknown-linux-gnu
use_zig: true
zig_args: "-target aarch64-linux-gnu -g"
- target: armv7-unknown-linux-gnueabihf
use_zig: true
zig_args: "-target arm-linux-gnueabihf -mcpu=generic+v7a+vfp3-d32+thumb2-neon -g"
- target: x86_64-unknown-linux-musl
use_zig: true
zig_args: "-target x86_64-linux-musl"
runs-on: ubuntu-latest
env:
SQLX_OFFLINE: true
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install clang
run: sudo apt install -y clang libclang-dev cmake
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
with:
toolchain: stable
components: clippy
targets: ${{matrix.target}}
- name: Install bindgen
run: cargo install --force --locked bindgen-cli
- name: Install cross-compilation tools
uses: taiki-e/setup-cross-toolchain-action@3d9770ce98eb7dbcf378563182a5e8031165f75b # v1.41.0
with:
target: ${{ matrix.target }}
- name: Rust cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
shared-key: "stable-${{matrix.target}}"
- name: Run clippy
run: cargo clippy --target ${{matrix.target}} --workspace --all-targets --all-features -- -D warnings
audit-dependencies:
name: Audit dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: EmbarkStudios/cargo-deny-action@bb137d7af7e4fb67e5f82a49c4fce4fad40782fe
with:
arguments: --workspace --all-features