Skip to content

Commit

Permalink
ci: check lints and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cfm committed Dec 27, 2023
1 parent 4e011a8 commit e435b8c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@ name: Rust

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Lint
run: cargo clippy
- name: Check formatting
run: cargo fmt -- --check
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(clippy::all)]

use colored::*;
use rand::Rng;
use std::collections::HashMap;
Expand Down

0 comments on commit e435b8c

Please sign in to comment.