mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 15:01:45 +01:00
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
name: Continuous integration
|
|
|
|
jobs:
|
|
code-checks:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: nightly
|
|
override: true
|
|
components: rustfmt, clippy
|
|
- name: Cargo fmt
|
|
run: cargo +nightly fmt --all -- --check
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- name: Cargo clippy
|
|
run: cargo clippy --all-targets --all-features -- -D warnings
|
|
stable-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- name: Cargo test
|
|
run: cargo test --all-features
|
|
build-example:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
example: [
|
|
admin_bot,
|
|
dialogue_bot,
|
|
heroku_ping_pong_bot,
|
|
ngrok_ping_pong_bot,
|
|
ping_pong_bot,
|
|
shared_state_bot,
|
|
simple_commands_bot,
|
|
]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- name: Test the example
|
|
run: cd examples && cd ${{ matrix.example }} && cargo check
|