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