Skip to content

Commit

Permalink
ci: Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
leo91000 committed Dec 19, 2022
1 parent 5ac1deb commit 80d7fb5
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test

on:
push:
branches:
- main

pull_request:
branches:
- main


jobs:
test:
timeout-minutes: 20

runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
key: v1 # increment this to bust the cache if needed
- name: Rustfmt
run: cargo fmt --all -- --check
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- --no-deps
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all

0 comments on commit 80d7fb5

Please sign in to comment.