diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index e5797ce..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Continuous integration - -on: [push, pull_request] - -jobs: - check: - name: Check - runs-on: ubuntu-latest - strategy: - matrix: - rust: - - stable - - 1.36.0 - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ matrix.rust }} - override: true - - uses: actions-rs/cargo@v1 - with: - command: check diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..993ff07 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,68 @@ +name: Continuous integration + +on: [push, pull_request] + +jobs: + check: + name: Check + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + - beta + - 1.36.0 + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + + fmt: + name: Rustfmt + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + - beta + - 1.36.0 + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + - beta + - 1.36.0 + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + - run: rustup component add clippy + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings