diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6c76790 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: Rust + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Rustfmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release