teloxide/.github/workflows/ci.yml

49 lines
1.1 KiB
YAML
Raw Normal View History

on: [push, pull_request]
2019-11-27 17:30:33 +03:00
name: Continuous integration
jobs:
2020-07-01 21:15:48 +06:00
ci:
2019-11-27 17:30:33 +03:00
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
2020-07-01 21:21:12 +06:00
2019-11-27 17:30:33 +03:00
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
2020-07-01 21:22:53 +06:00
components: rustfmt
2019-11-27 17:30:33 +03:00
2020-07-01 21:28:08 +06:00
- name: Setup redis
2020-07-01 21:32:58 +06:00
run: sudo apt install redis-server && redis-server --port 7777
2020-07-01 21:28:08 +06:00
2019-11-27 17:30:33 +03:00
- name: stable/beta test
uses: actions-rs/cargo@v1
if: matrix.rust == 'stable' || matrix.rust == 'beta'
with:
command: test
2020-07-01 21:01:14 +06:00
args: --verbose --all-features
2019-11-27 17:30:33 +03:00
- name: stable/beta clippy
uses: actions-rs/cargo@v1
if: matrix.rust == 'stable' || matrix.rust == 'beta'
with:
command: clippy
2020-07-01 21:01:14 +06:00
args: --all-targets --all-features -- -D warnings
2019-11-27 17:30:33 +03:00
2020-03-31 13:38:48 +06:00
- name: Test the examples
2020-03-31 21:45:22 +06:00
run: cd examples && bash test_examples.sh
2020-03-31 13:38:48 +06:00
2020-03-27 18:54:06 +06:00
- name: fmt
uses: actions-rs/cargo@v1
if: matrix.rust == 'nightly'
with:
command: fmt
args: --all -- --check