2020-07-02 16:01:45 +03:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
2020-08-17 18:30:19 +03:00
|
|
|
branches: [ master, dev ]
|
2019-11-27 17:30:33 +03:00
|
|
|
|
|
|
|
name: Continuous integration
|
|
|
|
|
|
|
|
jobs:
|
2021-03-21 18:34:23 +06:00
|
|
|
style:
|
2019-11-27 17:30:33 +03:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-21 18:34:23 +06:00
|
|
|
|
2019-11-27 17:30:33 +03:00
|
|
|
steps:
|
2020-07-03 15:52:16 +03:00
|
|
|
- uses: actions/checkout@v2
|
2019-11-27 17:30:33 +03:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
2022-02-05 01:13:44 +06:00
|
|
|
toolchain: nightly-2022-02-02
|
2019-11-27 17:30:33 +03:00
|
|
|
override: true
|
2021-03-21 18:34:23 +06: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 15:50:28 +03:00
|
|
|
- uses: actions-rs/toolchain@v1
|
2019-11-27 17:30:33 +03:00
|
|
|
with:
|
2020-07-03 15:50:28 +03:00
|
|
|
profile: minimal
|
2022-02-05 01:13:44 +06:00
|
|
|
toolchain: nightly-2022-02-02
|
2020-07-03 15:50:28 +03:00
|
|
|
override: true
|
2021-03-21 18:34:23 +06:00
|
|
|
components: clippy
|
|
|
|
|
|
|
|
- name: clippy
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
|
|
|
args: --all-targets --all-features -- -D warnings
|
2020-08-12 23:53:58 +03:00
|
|
|
|
|
|
|
test:
|
2020-07-02 15:48:37 +03:00
|
|
|
runs-on: ubuntu-latest
|
2020-08-12 23:53:58 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-03-21 18:34:23 +06:00
|
|
|
rust:
|
2020-08-12 23:53:58 +03:00
|
|
|
- stable
|
|
|
|
- beta
|
|
|
|
- nightly
|
2021-03-21 18:34:23 +06:00
|
|
|
|
2020-08-12 23:53:58 +03:00
|
|
|
include:
|
|
|
|
- rust: stable
|
2021-03-21 18:34:23 +06:00
|
|
|
features: "--features full"
|
2020-08-12 23:53:58 +03:00
|
|
|
- rust: beta
|
2021-03-21 18:34:23 +06:00
|
|
|
features: "--features full"
|
2020-08-12 23:53:58 +03:00
|
|
|
- rust: nightly
|
|
|
|
features: "--all-features"
|
|
|
|
|
2020-07-02 15:52:42 +03:00
|
|
|
steps:
|
2020-07-03 15:52:16 +03:00
|
|
|
- uses: actions/checkout@v2
|
2021-03-21 18:34:23 +06:00
|
|
|
|
2020-07-03 15:50:28 +03:00
|
|
|
- uses: actions-rs/toolchain@v1
|
2019-11-27 17:30:33 +03:00
|
|
|
with:
|
2020-07-03 15:50:28 +03:00
|
|
|
profile: minimal
|
2020-08-12 23:53:58 +03:00
|
|
|
toolchain: ${{ matrix.rust }}
|
2020-07-03 15:50:28 +03:00
|
|
|
override: true
|
2021-03-21 18:34:23 +06:00
|
|
|
|
|
|
|
- name: build
|
2020-08-12 23:53:58 +03:00
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --verbose ${{ matrix.features }}
|
2021-03-21 18:34:23 +06:00
|
|
|
|
2020-08-13 00:07:16 +03: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 18:34:23 +06:00
|
|
|
- name: test
|
2020-08-12 23:53:58 +03:00
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --verbose ${{ matrix.features }}
|
|
|
|
|
2020-07-03 19:08:26 +03:00
|
|
|
build-example:
|
2020-07-02 15:48:37 +03:00
|
|
|
runs-on: ubuntu-latest
|
2020-07-02 15:52:42 +03:00
|
|
|
steps:
|
2020-07-03 15:52:16 +03:00
|
|
|
- uses: actions/checkout@v2
|
2020-07-03 15:50:28 +03:00
|
|
|
- uses: actions-rs/toolchain@v1
|
2020-03-27 18:54:06 +06:00
|
|
|
with:
|
2020-07-03 15:50:28 +03:00
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2022-02-02 04:00:48 +06:00
|
|
|
- name: Check the examples
|
2022-02-02 15:29:52 +06:00
|
|
|
run: cargo check --examples --features="full"
|