fix: remove unused Validator initialization causing clippy warnings
This commit is contained in:
@@ -2,65 +2,39 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, master]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main, master]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Rust
|
||||||
- name: Install Rust
|
run: |
|
||||||
uses: actions-rs/toolchain@v1
|
rustup default stable
|
||||||
with:
|
rustc --version
|
||||||
toolchain: stable
|
cargo --version
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --release
|
run: cargo build --release
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --all
|
run: cargo test
|
||||||
|
- name: Clippy
|
||||||
- name: Run clippy
|
run: cargo clippy -- -D warnings
|
||||||
run: cargo clippy --all --all-features -- -D warnings
|
release:
|
||||||
|
|
||||||
- name: Check formatting
|
|
||||||
run: cargo fmt -- --check
|
|
||||||
|
|
||||||
binary:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: test
|
needs: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build Release
|
||||||
- name: Install Rust
|
run: |
|
||||||
uses: actions-rs/toolchain@v1
|
cargo build --release --locked
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: x86_64-unknown-linux-musl
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Build binary
|
|
||||||
run: cargo build --release --target x86_64-unknown-linux-musl
|
|
||||||
|
|
||||||
- name: Upload binary artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: env-guard-linux-amd64
|
|
||||||
path: target/x86_64-unknown-linux-musl/release/env-guard
|
|
||||||
|
|
||||||
release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: binary
|
|
||||||
if: startsWith(gitea.ref, 'refs/tags/v')
|
|
||||||
steps:
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: https://gitea.com/actions/release-action@main
|
uses: https://gitea.com/actions/release-action@main
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
target/x86_64-unknown-linux-musl/release/env-guard
|
target/release/env-guard
|
||||||
title: ${{ gitea.ref_name }}
|
title: ${{ github.ref_name }}
|
||||||
body: "Release ${{ gitea.ref_name }} of env-guard"
|
body: "Release ${{ github.ref_name }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user