diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d2a9c97 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +on: + pull_request: + push: + branches: + - main + +name: CI + +jobs: + check: + name: ${{ matrix.target_name }} (check, clippy) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - target_name: Linux + os: ubuntu-latest + - target_name: macOS + os: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run cargo fmt + env: + TERM: xterm-256color + run: | + cargo +nightly fmt --all -- --check + + - name: Run cargo clippy + run: cargo clippy + + - name: Run cargo test + run: cargo test