vmexec 0.6.0

Run a single command in a speedy virtual machine with zero-setup
image: "archlinux:latest"

variables:
  CARGO_TERM_COLOR: always

stages:
  - lint
  - test

format:
  before_script:
    - pacman -Syu --needed --noconfirm rust cargo-audit pkgconf
  stage: lint
  script:
    - cargo fmt --all -- --check

clippy:
  before_script:
    - pacman -Syu --needed --noconfirm rust cargo-audit pkgconf
  stage: lint
  script:
    - cargo clippy --all -- -D warnings

audit:
  before_script:
    - pacman -Syu --needed --noconfirm cargo-audit
  stage: lint
  script:
    - cargo audit

test:
  before_script:
    - pacman -Syu --needed --noconfirm rust pkgconf qemu-base libguestfs
  stage: test
  tags:
    - vm
  script:
    # Warm up VM image
    - cargo run -- --log-level debug run archlinux --rm echo warmed up
    - cargo test -- --test-threads 1