Skip to content

Commit

Permalink
chore: setup toolchain and update CI (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntn-x2 authored Feb 13, 2025
1 parent f5f7ea0 commit 1ef684e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 46 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,10 @@ jobs:
RUSTFLAGS: -C instrument-coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: llvm-tools-preview
- uses: actions-rs/cargo@v1
continue-on-error: true
- run: rustup component add llvm-tools-preview
- run: |
cargo install grcov;
cargo test --all-features;
Expand Down
37 changes: 7 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@ jobs:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: check
args: --all --all-targets --all-features

test:
name: Test Suite
Expand All @@ -28,47 +23,29 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: build
- uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: test
args: --all-targets --all-features

lints:
name: Rust lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Run cargo fmt
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: fmt
args: --all -- --check

args: --all --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: clippy
args: -- --deny warnings
args: --all-targets --all-features -- --deny warnings
6 changes: 1 addition & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ name: Release
jobs:
release:
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v4
- uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**target/
.idea/
Cargo.lock
Cargo.lock
.vscode
2 changes: 1 addition & 1 deletion overwatch-rs/tests/state_handling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct UpdateStateService {
}

#[derive(Clone, Debug)]
pub struct UpdateStateServiceMessage(String);
pub struct UpdateStateServiceMessage;

impl RelayMessage for UpdateStateServiceMessage {}

Expand Down
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "stable"
2 changes: 2 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
reorder_imports = true
reorder_modules = true

0 comments on commit 1ef684e

Please sign in to comment.