feat: implement VM pause and resume #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: On Push - Main | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
types: [opened, reopened, synchronize] | |
paths-ignore: | |
- "**.md" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: ${{ github.ref != format('refs/heads/{0}', 'main') }} | |
jobs: | |
quality: | |
name: Quality | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 25 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Package Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
- name: Format Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Linting Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
unit-tests: | |
name: Unit Tests | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 25 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
# setup firecracker binary for integration tests | |
- name: Setup Firecracker | |
run: | | |
mkdir -p fixtures | |
release_url="https://github.com/firecracker-microvm/firecracker/releases" | |
latest=$(basename $(curl -fsSLI -o /dev/null -w %{url_effective} ${release_url}/latest)) | |
arch=`uname -m` | |
curl -L ${release_url}/download/${latest}/firecracker-${latest}-${arch}.tgz \ | |
| tar -xz | |
sudo mv release-${latest}-$(uname -m)/firecracker-${latest}-$(uname -m) /usr/bin/firecracker | |
- shell: bash | |
name: Remove integration tests folder | |
run: | | |
echo "Delete tests folder in order to only run unit tests" | |
rm -rf tests | |
- name: Package Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
build: | |
needs: [quality, unit-tests] | |
name: Build | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y pkg-config libssl-dev openssl | |
- uses: actions-rs/cargo@v1 | |
name: Build Release | |
with: | |
command: build | |
args: --tests --examples --release |