1
0
mirror of https://github.com/containers/youki synced 2024-11-23 09:21:57 +01:00
youki/.github/workflows/main.yml
2021-05-15 18:42:28 +09:00

54 lines
1.6 KiB
YAML

on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
- name: Build
run: cargo build
- name: Run tests
run: cargo test
integration_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: build
- uses: actions/setup-go@v2
with:
go-version: "1.11.0"
- name: Build runtime-tools
run: |
mkdir -p $(go env GOPATH)/src/github.com/opencontainers
cd $(go env GOPATH)/src/github.com/opencontainers
git clone https://github.com/opencontainers/runtime-tools
cd runtime-tools
make runtimetest validation-executables
- name: Run intetgration tests
run: |
expect_err_num=8
act_err_num=0
cd $(go env GOPATH)/src/github.com/opencontainers/runtime-tools
if [ 0 -ne $(sudo RUNTIME=$GITHUB_WORKSPACE/target/x86_64-unknown-linux-gnu/debug/youki ./validation/linux_cgroups_devices/linux_cgroups_devices.t | grep "not ok" | wc -l) ]; then
exit 1
fi
if [ 0 -ne $(sudo RUNTIME=$GITHUB_WORKSPACE/target/x86_64-unknown-linux-gnu/debug/youki ./validation/default/default.t | grep "not ok" | wc -l) ]; then
exit 1
fi