diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..be40096 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,57 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + +jobs: + # build_and_test: + # name: Build and test + # runs-on: ${{ matrix.os }} + # strategy: + # matrix: + # os: [ubuntu-latest, windows-latest, macOS-latest] + # rust: [nightly-2019-09-03] + # steps: + # - name: Checkout master + # uses: actions/checkout@master + # - name: Install ${{ matrix.rust }} toolchain + # uses: actions-rs/toolchain@v1 + # with: + # toolchain: ${{ matrix.rust }} + # override: true + # - name: Running cargo check + # uses: actions-rs/cargo@v1 + # with: + # command: check + # args: --all --bins --examples + # - name: Running cargo check (unstable) + # uses: actions-rs/cargo@v1 + # with: + # command: check + # args: --all --benches --bins --examples --tests + # - name: Running cargo tests + # uses: actions-rs/cargo@v1 + # with: + # command: test + # args: --all + + check_fmt: + name: Check code formatting + runs-on: ubuntu-latest + steps: + - name: Checkout master branch + uses: actions/checkout@master + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Install rustfmt + run: | + rustup component add rustfmt + rustfmt --version + - name: Check formatting + run: cargo fmt --all -- --check