Skip to content
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
41 changes: 41 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: CI

on:
workflow_call:
workflow_dispatch:

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build binaries
run: cargo build
- name: Run tests
run: cargo test

fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check code format
run: cargo fmt --all -- --check

clippy:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint code
run: cargo clippy --all-features -- -D warnings
14 changes: 14 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Pull Request

on:
workflow_dispatch:
pull_request:
types:
- opened
- edited

jobs:
ci:
uses: ./.github/workflows/ci.yaml
secrets: inherit
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Leetcode Command Line Interface

[![Tests Status][actions-badge]][actions-url]

[actions-badge]: https://github.com/coding-kelps/leetcode-cli/actions/workflows/ci.yaml/badge.svg?branch=main

Interact with LeetCode in your development environment.

## Example
Expand Down