mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 06:51:01 +01:00
088a51cb5f
Both Clippy and Rustfmt are pinned to the current latest version (2021-10-24)
114 lines
2.5 KiB
YAML
114 lines
2.5 KiB
YAML
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master, dev ]
|
|
|
|
name: Continuous integration
|
|
|
|
jobs:
|
|
style:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: nightly-2021-10-24
|
|
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-2021-10-24
|
|
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
|
|
|
|
include:
|
|
- rust: stable
|
|
features: "--features full"
|
|
- rust: beta
|
|
features: "--features full"
|
|
- rust: nightly
|
|
features: "--all-features"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
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
|
|
strategy:
|
|
matrix:
|
|
example: [
|
|
admin_bot,
|
|
dialogue_bot,
|
|
heroku_ping_pong_bot,
|
|
ngrok_ping_pong_bot,
|
|
dices_bot,
|
|
shared_state_bot,
|
|
simple_commands_bot,
|
|
redis_remember_bot,
|
|
]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- name: Check the example
|
|
run: cd examples && cd ${{ matrix.example }} && cargo check
|