mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
112 lines
2.5 KiB
YAML
112 lines
2.5 KiB
YAML
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master, dev ]
|
|
|
|
name: Continuous integration
|
|
|
|
env:
|
|
RUSTFLAGS: "--cfg CI_REDIS"
|
|
|
|
jobs:
|
|
style:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: nightly-2022-02-02
|
|
override: true
|
|
components: rustfmt
|
|
|
|
- name: fmt
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
clippy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: nightly-2022-02-02
|
|
override: true
|
|
components: clippy
|
|
|
|
- name: clippy
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --all-targets --all-features -- -D warnings
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
rust:
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
- msrv
|
|
|
|
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"
|
|
- rust: msrv
|
|
toolchain: "1.58.0"
|
|
features: "--features full"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- 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: Setup redis
|
|
run: |
|
|
sudo apt install redis-server
|
|
redis-server --port 7777 > /dev/null &
|
|
redis-server --port 7778 > /dev/null &
|
|
redis-server --port 7779 > /dev/null &
|
|
|
|
- name: test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --verbose ${{ matrix.features }}
|
|
|
|
build-example:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- name: Check the examples
|
|
run: cargo check --examples --features="full"
|