2020-07-04 16:34:07 +02:00
|
|
|
|
2020-07-02 15:01:45 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
2019-11-27 15:30:33 +01:00
|
|
|
|
|
|
|
name: Continuous integration
|
|
|
|
|
|
|
|
jobs:
|
2020-07-02 14:48:37 +02:00
|
|
|
code-checks:
|
2019-11-27 15:30:33 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-07-03 14:52:16 +02:00
|
|
|
- uses: actions/checkout@v2
|
2019-11-27 15:30:33 +01:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
2020-07-02 14:57:06 +02:00
|
|
|
toolchain: nightly
|
2019-11-27 15:30:33 +01:00
|
|
|
override: true
|
2020-07-02 14:57:06 +02:00
|
|
|
components: rustfmt, clippy
|
2020-07-02 14:48:37 +02:00
|
|
|
- name: Cargo fmt
|
2020-07-02 14:54:24 +02:00
|
|
|
run: cargo +nightly fmt --all -- --check
|
2020-07-03 14:50:28 +02:00
|
|
|
- uses: actions-rs/toolchain@v1
|
2019-11-27 15:30:33 +01:00
|
|
|
with:
|
2020-07-03 14:50:28 +02:00
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2020-07-02 14:48:37 +02:00
|
|
|
- name: Cargo clippy
|
2020-07-24 21:48:17 +02:00
|
|
|
run: cargo clippy --all --all-targets --all-features -- -D warnings
|
2020-08-12 22:53:58 +02:00
|
|
|
|
|
|
|
test:
|
2020-07-02 14:48:37 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-08-12 22:53:58 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
rust:
|
|
|
|
- stable
|
|
|
|
- beta
|
|
|
|
- nightly
|
|
|
|
|
|
|
|
include:
|
|
|
|
- rust: stable
|
|
|
|
features: "--features \"redis-storage cbor-serializer bincode-serializer frunk-\""
|
|
|
|
- rust: beta
|
|
|
|
features: "--features \"redis-storage cbor-serializer bincode-serializer frunk-\""
|
|
|
|
- rust: nightly
|
|
|
|
features: "--all-features"
|
|
|
|
|
2020-07-02 14:52:42 +02:00
|
|
|
steps:
|
2020-07-03 14:52:16 +02:00
|
|
|
- uses: actions/checkout@v2
|
2020-08-12 22:53:58 +02:00
|
|
|
|
2020-07-03 14:50:28 +02:00
|
|
|
- uses: actions-rs/toolchain@v1
|
2019-11-27 15:30:33 +01:00
|
|
|
with:
|
2020-07-03 14:50:28 +02:00
|
|
|
profile: minimal
|
2020-08-12 22:53:58 +02:00
|
|
|
toolchain: ${{ matrix.rust }}
|
2020-07-03 14:50:28 +02:00
|
|
|
override: true
|
2020-08-12 22:53:58 +02:00
|
|
|
|
|
|
|
- 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 }}
|
|
|
|
|
2020-07-03 18:08:26 +02:00
|
|
|
build-example:
|
2020-07-02 14:48:37 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-07-03 18:09:53 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
example: [
|
|
|
|
admin_bot,
|
|
|
|
dialogue_bot,
|
|
|
|
heroku_ping_pong_bot,
|
|
|
|
ngrok_ping_pong_bot,
|
2020-07-29 12:02:37 +02:00
|
|
|
dices_bot,
|
2020-07-03 18:09:53 +02:00
|
|
|
shared_state_bot,
|
|
|
|
simple_commands_bot,
|
2020-07-30 14:23:02 +02:00
|
|
|
redis_remember_bot,
|
2020-07-03 18:09:53 +02:00
|
|
|
]
|
2020-07-02 14:52:42 +02:00
|
|
|
steps:
|
2020-07-03 14:52:16 +02:00
|
|
|
- uses: actions/checkout@v2
|
2020-07-03 14:50:28 +02:00
|
|
|
- uses: actions-rs/toolchain@v1
|
2020-03-27 13:54:06 +01:00
|
|
|
with:
|
2020-07-03 14:50:28 +02:00
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2020-07-03 18:08:26 +02:00
|
|
|
- name: Test the example
|
|
|
|
run: cd examples && cd ${{ matrix.example }} && cargo check
|