2020-07-02 15:01:45 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
2020-08-17 17:30:19 +02:00
|
|
|
branches: [ master, dev ]
|
2019-11-27 15:30:33 +01:00
|
|
|
|
|
|
|
name: Continuous integration
|
|
|
|
|
|
|
|
jobs:
|
2021-03-21 13:34:23 +01:00
|
|
|
style:
|
2019-11-27 15:30:33 +01:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-21 13:34:23 +01:00
|
|
|
|
2019-11-27 15:30:33 +01:00
|
|
|
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
|
2022-02-04 20:13:44 +01:00
|
|
|
toolchain: nightly-2022-02-02
|
2019-11-27 15:30:33 +01:00
|
|
|
override: true
|
2021-03-21 13:34:23 +01:00
|
|
|
components: rustfmt
|
|
|
|
|
|
|
|
- name: fmt
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
|
|
|
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
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
|
2022-02-04 20:13:44 +01:00
|
|
|
toolchain: nightly-2022-02-02
|
2020-07-03 14:50:28 +02:00
|
|
|
override: true
|
2021-03-21 13:34:23 +01:00
|
|
|
components: clippy
|
|
|
|
|
|
|
|
- name: clippy
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
|
|
|
args: --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:
|
2021-03-21 13:34:23 +01:00
|
|
|
rust:
|
2020-08-12 22:53:58 +02:00
|
|
|
- stable
|
|
|
|
- beta
|
|
|
|
- nightly
|
2021-03-21 13:34:23 +01:00
|
|
|
|
2020-08-12 22:53:58 +02:00
|
|
|
include:
|
|
|
|
- rust: stable
|
2021-03-21 13:34:23 +01:00
|
|
|
features: "--features full"
|
2020-08-12 22:53:58 +02:00
|
|
|
- rust: beta
|
2021-03-21 13:34:23 +01:00
|
|
|
features: "--features full"
|
2020-08-12 22:53:58 +02:00
|
|
|
- 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
|
2021-03-21 13:34:23 +01: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
|
2021-03-21 13:34:23 +01:00
|
|
|
|
|
|
|
- name: build
|
2020-08-12 22:53:58 +02:00
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --verbose ${{ matrix.features }}
|
2021-03-21 13:34:23 +01:00
|
|
|
|
2020-08-12 23:07:16 +02:00
|
|
|
- name: Setup redis
|
|
|
|
run: |
|
|
|
|
sudo apt install redis-server
|
|
|
|
redis-server --port 7777 > /dev/null &
|
|
|
|
redis-server --port 7778 > /dev/null &
|
|
|
|
redis-server --port 7779 > /dev/null &
|
|
|
|
|
2021-03-21 13:34:23 +01:00
|
|
|
- name: test
|
2020-08-12 22:53:58 +02:00
|
|
|
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-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
|
2022-02-01 23:00:48 +01:00
|
|
|
- name: Check the examples
|
2022-02-02 10:29:52 +01:00
|
|
|
run: cargo check --examples --features="full"
|