diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7e94039 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: ci + +on: [push, pull_request] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: ${{ matrix.os }} + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Install clippy and rustfmt + run: | + rustup component add clippy + rustup component add rustfmt + + - name: Build + run: cargo build --verbose + + - name: Run tests + run: cargo test --verbose + + - name: Check formatting + run: cargo fmt -- --check + + - name: Run clippy + run: cargo clippy -- -D warnings