Skip to content

Commit

Permalink
ci: add ci for testing and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dundargoc committed Sep 19, 2023
1 parent 2bebf74 commit 92110af
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
push:
branches:
- 'master'
pull_request:

name: build-and-test

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
check:
name: Build and Check
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4

- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --check
- run: cargo clippy --workspace -- -Dwarnings
- run: cargo build --workspace
- run: cargo test --workspace
8 changes: 3 additions & 5 deletions src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ impl CommandParser {
let args = args?;
Some(Sandwich { to: args[0] })
}
x => {
self.url_commands_json.get(x).map(|url| Url {
url: url.as_str().unwrap(),
})
}
x => self.url_commands_json.get(x).map(|url| Url {
url: url.as_str().unwrap(),
}),
}
} else if self.backticked_help_regex.is_match(string).unwrap() {
let mut docs = self
Expand Down

0 comments on commit 92110af

Please sign in to comment.