Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
myl7 committed Dec 21, 2024
1 parent 90935b8 commit bc644b8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI
on:
push:
branches: [main, "alpha/**"]
pull_request:
branches: [main, "alpha/**"]

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ["nightly", "stable"]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy
- name: Format
run: cargo fmt --check
- name: Set feat_toolchain
run: echo "feat_toolchain=$(if [[ '${{ matrix.toolchain }}' = 'stable' ]]; then printf 'stable'; fi)" >> "$GITHUB_ENV"
- name: Lint
run: cargo clippy --no-deps --no-default-features -F "$feat_toolchain" -- -Dwarnings
- name: Test
run: cargo test --no-default-features -F "$feat_toolchain"

0 comments on commit bc644b8

Please sign in to comment.