Skip to content

Add platform guides and distro integration test matrix #12

Add platform guides and distro integration test matrix

Add platform guides and distro integration test matrix #12

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.6
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run unit tests
run: bun run test
- name: Typecheck
run: bun run typecheck
- name: Build
run: bun run build
integration-tests:
runs-on: ubuntu-latest
needs: build-and-test
timeout-minutes: 50
strategy:
fail-fast: false
matrix:
include:
- distro: alpine
image: alpine:3.20
probe_path: /etc/alpine-release
probe_command: cat /etc/alpine-release
probe_expect: "3.20"
- distro: debian
image: debian:bookworm-slim
probe_path: /etc/debian_version
probe_command: cat /etc/debian_version
probe_expect: "12"
- distro: ubuntu
image: ubuntu:24.04
probe_path: /etc/os-release
probe_command: . /etc/os-release; echo "$ID:$VERSION_ID"
probe_expect: ubuntu:24.04
- distro: fedora
image: fedora:41
probe_path: /etc/fedora-release
probe_command: cat /etc/fedora-release
probe_expect: "Fedora release 41"
- distro: archlinux
image: archlinux:latest
probe_path: /etc/os-release
probe_command: . /etc/os-release; echo "$ID"
probe_expect: arch
name: integration-tests (${{ matrix.distro }})
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.6
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y qemu-system-x86 e2fsprogs
- name: Prime Gondolin guest assets
run: bunx gondolin exec -- /bin/true
- name: Run integration tests
env:
INTEGRATION_PLATFORM: linux/amd64
INTEGRATION_IMAGE: ${{ matrix.image }}
INTEGRATION_ROOTFS_CHECK_PATH: ${{ matrix.probe_path }}
INTEGRATION_VM_CHECK_COMMAND: ${{ matrix.probe_command }}
INTEGRATION_VM_CHECK_EXPECT: ${{ matrix.probe_expect }}
run: bun run test:integration
e2e-smoke:
runs-on: ubuntu-latest
needs: build-and-test
timeout-minutes: 35
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.6
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y qemu-system-x86 e2fsprogs
- name: Prime Gondolin guest assets
run: bunx gondolin exec -- /bin/true
- name: Run end-to-end smoke test
env:
PLATFORM: linux/amd64
IMAGE: busybox:latest
run: bun run e2e:smoke