mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-26 11:35:35 +00:00
b131a74f99
Okay, so, at a high level testing NixOS is a lot different than other distros due to NixOS' determinism. Normally NixOS wants packages to be defined in either an overlay, a custom packageOverrides or even yolo-inline as a part of the system configuration. This is going to have us take a different approach compared to other distributions. The overall plan here is as following: 1. make the binaries as normal 2. template in their paths as raw strings to the nixos system module 3. run `nixos-generators -f qcow -o $CACHE_DIR/tailscale/nixos/version -c generated-config.nix` 4. pass that to the steps that make the virtual machine It doesn't really make sense for us to use a premade virtual machine image for this as that will make it harder to deterministically create the image. Nix commands generate a lot of output, so their output is hidden behind the `-verbose-nix-output` flag. This unfortunately makes this test suite have a hard dependency on Nix/NixOS, however the test suite has only ever been run on NixOS (and I am not sure if it runs on other distros at all), so this probably isn't too big of an issue. Signed-off-by: Christine Dodrill <xe@tailscale.com>
37 lines
962 B
YAML
37 lines
962 B
YAML
name: "integration-vms"
|
|
|
|
on:
|
|
# # NOTE(Xe): uncomment this region when testing the test
|
|
# pull_request:
|
|
# branches:
|
|
# - 'main'
|
|
release:
|
|
types: [ created ]
|
|
schedule:
|
|
# At minute 0 past hour 6 and 18
|
|
# https://crontab.guru/#00_6,18_*_*_*
|
|
- cron: '00 6,18 * * *'
|
|
|
|
jobs:
|
|
experimental-linux-vm-test:
|
|
# To set up a new runner, see tstest/integration/vms/runner.nix
|
|
runs-on: [ self-hosted, linux, vm_integration_test ]
|
|
|
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Download VM Images
|
|
run: go test ./tstest/integration/vms -run-vm-tests -run=Download -timeout=60m
|
|
env:
|
|
XDG_CACHE_HOME: "/var/lib/ghrunner/cache"
|
|
|
|
- name: Run VM tests
|
|
run: go test ./tstest/integration/vms -run-vm-tests
|
|
env:
|
|
TMPDIR: "/tmp"
|
|
XDG_CACHE_HOME: "/var/lib/ghrunner/cache"
|
|
|