teloxide/.github/workflows/ci.yml
2022-03-25 13:12:26 +04:00

89 lines
1.8 KiB
YAML

on:
push:
branches:
- master
pull_request:
branches:
- master
name: Continuous integration
jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-01-17
override: true
components: rustfmt
- name: fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
include:
- rust: stable
toolchain: stable
features: "--features full"
- rust: beta
toolchain: beta
features: "--features full"
- rust: nightly
toolchain: nightly-2022-01-17
features: "--all-features"
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true
- name: build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose ${{ matrix.features }}
- name: test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose ${{ matrix.features }}
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-01-17
override: true
components: clippy
- name: clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D warnings