mirror of
https://github.com/containers/youki
synced 2024-05-21 06:56:06 +02:00
99 lines
2.7 KiB
YAML
99 lines
2.7 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
rust: [stable]
|
|
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') }}
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
- run: rustup component add rustfmt clippy
|
|
- run: sudo apt-get -y update
|
|
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev
|
|
- name: Check formatting
|
|
run: cargo fmt --all -- --check
|
|
- uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --all-targets --all-features -- -D warnings
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
rust: [1.54.0]
|
|
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') }}
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
- run: sudo apt-get -y update
|
|
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev
|
|
- name: Build
|
|
run: ./build.sh --release
|
|
- name: Run tests
|
|
run: cargo test
|
|
- name: Run doc tests
|
|
run: cargo test --doc
|
|
- name: Run cgroup tests
|
|
working-directory: cgroups
|
|
run: cargo test
|
|
integration_tests:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
rust: [1.54.0]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
- 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') }}
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
- run: sudo apt-get -y update
|
|
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev
|
|
- name: Build
|
|
run: ./build.sh --release
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: "1.11.0"
|
|
- name: Run intetgration tests
|
|
run: ./integration_test.sh
|