diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..aa0f505 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: [ push, pull_request ] + +jobs: + build: + strategy: + matrix: + platform: [ ubuntu-latest ] + node-version: [ 20 ] + rust-version: [ stable, nightly ] + + runs-on: ${{ matrix.platform }} + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Install build dependencies + run: sudo apt-get update && sudo apt-get -y install protobuf-compiler + + - name: Use Rust toolchain + run: rustup update ${{ matrix.rust-version }} && rustup default ${{ matrix.rust-version }} + + - name: Install rustfmt + run: rustup component add rustfmt + + - name: Install clippy + run: rustup component add clippy + + - name: Compile + run: cargo build + + - name: Format + run: cargo fmt --check + + - name: Clippy + run: cargo clippy