Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cleanup ci and add more checks. Remove Cargo.lock file #6

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 36 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,43 @@ name: ci
env:
RUST_BACKTRACE: 1

# By default depandabot only receives read permissions. Explicitly give it write
# permissions which is needed by the ouzi-dev/commit-status-updater task.
#
# Updating status is relatively safe (doesnt modify source code) and caution
# should we taken before adding more permissions.
permissions:
statuses: write

jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install rust toolchain
id: toolchain
run: |
rustup toolchain install stable
rustup override set stable

- name: Run cargo fmt
run: |
cargo fmt -- --check

clippy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- toolchain: stable
# fail on stable warnings
args: "-D warnings"
- toolchain: beta
steps:
- uses: actions/checkout@v4
- name: Install rust toolchain
id: toolchain
run: |
rustup toolchain install ${{ matrix.toolchain }} --profile minimal --component clippy
rustup override set ${{ matrix.toolchain }}

- name: Run cargo clippy
run: |
cargo clippy --all-features --all-targets --workspace -- ${{ matrix.args }}

test:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -37,10 +65,6 @@ jobs:
rustup override set ${{ matrix.rust }}
rustup toolchain install ${{ matrix.rust }}

- name: Run cargo build
run: |
cargo build --tests

- name: Run cargo test
run: |
cargo test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
Cargo.lock
7 changes: 0 additions & 7 deletions Cargo.lock

This file was deleted.