teloxide/.github/workflows/ci.yml
Temirkhan Myrzamadi 66e14671d3
Update ci.yml
2020-07-01 21:28:08 +06:00

53 lines
1.2 KiB
YAML

on: [push, pull_request]
name: Continuous integration
jobs:
ci:
services:
redis:
image: redis
ports:
- 6379/tcp
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt
- name: Setup redis
run: redis-server
- name: stable/beta test
uses: actions-rs/cargo@v1
if: matrix.rust == 'stable' || matrix.rust == 'beta'
with:
command: test
args: --verbose --all-features
- name: stable/beta clippy
uses: actions-rs/cargo@v1
if: matrix.rust == 'stable' || matrix.rust == 'beta'
with:
command: clippy
args: --all-targets --all-features -- -D warnings
- name: Test the examples
run: cd examples && bash test_examples.sh
- name: fmt
uses: actions-rs/cargo@v1
if: matrix.rust == 'nightly'
with:
command: fmt
args: --all -- --check