Skip to content

Commit

Permalink
move lint tasks to a lint-specific github actions job (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
demoray authored Feb 6, 2025
1 parent 5e8e85d commit b196f09
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ env:
CARGO_TERM_COLOR: always

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: lint
run: eng/lint.sh
x64:
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 0 additions & 5 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ cd $(dirname ${BASH_SOURCE[0]})/../

ARCH=$(uname -m)

typos

cargo fmt -- --check
cargo semver-checks check-release
cargo clippy --locked --all-targets --all-features -- -D warnings -D clippy::pedantic -A clippy::missing_errors_doc
cargo test --release --target ${ARCH}-unknown-linux-musl --locked --all-targets --all-features
for FEATURE in $(cargo metadata --locked --format-version 1 | jq '.packages | [.[] | select(.name=="avml")][0].features | keys | @tsv' -r); do
cargo check --release --target ${ARCH}-unknown-linux-musl --locked --no-default-features --features ${FEATURE} --features native-tls
Expand Down
18 changes: 18 additions & 0 deletions eng/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#

set -uvex -o pipefail

cd $(dirname ${BASH_SOURCE[0]})/../

cargo fmt -- --check
cargo clippy --locked --all-targets --all-features -- -D warnings -D clippy::pedantic -A clippy::missing_errors_doc

cargo install typos-cli
typos

cargo install cargo-semver-checks --locked
cargo semver-checks check-release

0 comments on commit b196f09

Please sign in to comment.