2021-04-04 03:54:09 +02:00
|
|
|
on:
|
2021-04-04 03:44:08 +02:00
|
|
|
push:
|
2021-04-04 03:54:09 +02:00
|
|
|
branches:
|
|
|
|
- main
|
2021-04-04 03:44:08 +02:00
|
|
|
pull_request:
|
2021-04-04 03:54:09 +02:00
|
|
|
branches:
|
|
|
|
- main
|
2021-04-04 03:44:08 +02:00
|
|
|
|
|
|
|
jobs:
|
2021-07-11 09:20:53 +02:00
|
|
|
rustfmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/bin/
|
|
|
|
~/.cargo/registry/index/
|
|
|
|
~/.cargo/registry/cache/
|
|
|
|
~/.cargo/git/db/
|
|
|
|
target/
|
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- run: rustup component add rustfmt
|
|
|
|
- name: Check formatting
|
|
|
|
run: cargo fmt --all -- --check
|
2021-04-29 10:34:23 +02:00
|
|
|
tests:
|
2021-04-04 03:44:08 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-06-18 15:49:40 +02:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/bin/
|
|
|
|
~/.cargo/registry/index/
|
|
|
|
~/.cargo/registry/cache/
|
|
|
|
~/.cargo/git/db/
|
|
|
|
target/
|
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
2021-04-04 03:44:08 +02:00
|
|
|
- run: rustup component add clippy
|
2021-06-06 05:50:18 +02:00
|
|
|
- run: sudo apt-get -y update
|
|
|
|
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev
|
2021-04-04 03:44:08 +02:00
|
|
|
- uses: actions-rs/clippy-check@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
args: --all-features
|
2021-04-29 10:34:23 +02:00
|
|
|
- name: Build
|
2021-06-07 14:04:28 +02:00
|
|
|
run: ./build.sh
|
2021-04-29 10:34:23 +02:00
|
|
|
- name: Run tests
|
|
|
|
run: cargo test
|
2021-07-05 22:42:58 +02:00
|
|
|
- name: Run doc tests
|
|
|
|
run: cargo test --doc
|
2021-04-29 10:34:23 +02:00
|
|
|
integration_tests:
|
2021-04-04 03:54:09 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-04-04 17:17:48 +02:00
|
|
|
- uses: actions/checkout@v2
|
2021-05-27 14:24:11 +02:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-06-18 15:49:40 +02:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/bin/
|
|
|
|
~/.cargo/registry/index/
|
|
|
|
~/.cargo/registry/cache/
|
|
|
|
~/.cargo/git/db/
|
|
|
|
target/
|
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
2021-04-04 03:44:08 +02:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
2021-06-06 05:50:18 +02:00
|
|
|
- run: sudo apt-get -y update
|
|
|
|
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev
|
2021-06-07 14:04:28 +02:00
|
|
|
- name: Build
|
|
|
|
run: ./build.sh
|
2021-04-04 03:54:09 +02:00
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: "1.11.0"
|
2021-04-29 10:34:23 +02:00
|
|
|
- name: Run intetgration tests
|
2021-05-26 11:50:03 +02:00
|
|
|
run: ./integration_test.sh
|