[PR #2954] [MERGED] .github/workflows: prebuilt integration test artifacts #2961

Closed
opened 2025-12-29 04:19:50 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2954
Author: @kradalby
Created: 12/11/2025
Status: Merged
Merged: 12/12/2025
Merged by: @kradalby

Base: mainHead: kradalby/integration-artifact


📝 Commits (10+)

  • 5fbd31a .github/workflows: attempt to prebuild docker containers
  • f42e55c Dockerfile: tailscale use alpine
  • a0682d5 .github/workflows: change integration changed filter
  • 716db1a .github/workflows: remove cache when restored
  • 34cc28a .github/workflows: simplify changed files
  • 5c3d897 .github/workflows: build containers once, reuse
  • 50e5722 .github/workflows: only use hi in integration tests
  • 7000e5c .github/workflows: try to cache go test deps
  • 7530d56 .github/workflows: no ro cache
  • 62dbfbb .github/workflows: update all integration actions

📊 Changes

19 files changed (+479 additions, -241 deletions)

View changed files

📝 .github/workflows/build.yml (+10 -13)
📝 .github/workflows/check-generated.yml (+2 -2)
📝 .github/workflows/check-tests.yaml (+3 -4)
📝 .github/workflows/docs-deploy.yml (+3 -3)
📝 .github/workflows/docs-test.yml (+3 -3)
📝 .github/workflows/gh-actions-updater.yaml (+2 -2)
📝 .github/workflows/integration-test-template.yml (+51 -28)
📝 .github/workflows/lint.yml (+9 -12)
📝 .github/workflows/nix-module-test.yml (+3 -4)
📝 .github/workflows/release.yml (+5 -6)
📝 .github/workflows/stale.yml (+3 -5)
📝 .github/workflows/test-integration.yaml (+114 -0)
📝 .github/workflows/test.yml (+3 -4)
📝 Dockerfile.integration (+23 -7)
Dockerfile.integration-ci (+17 -0)
📝 Dockerfile.tailscale-HEAD (+1 -1)
📝 cmd/hi/docker.go (+44 -12)
📝 integration/hsic/hsic.go (+85 -78)
📝 integration/tsic/tsic.go (+98 -57)

📄 Description

This PR restructures the integration tests and prebuilds all common assets used in all tests:

  • Headscale and Tailscale HEAD image
  • hi binary that is used to run tests
  • go cache is warmed up for compilation of the test

This essentially means we spend 6-10 minutes building assets before any tests starts, when that is done, all tests can just sprint through.

It looks like we are saving 3-9 minutes per test, and since we are limited to running max 20 concurrent tests across the repo, that means we had a lot of double work.

There is currently 113 checks, so we have to do five runs of 20, and the saving should be quite noticeable! I think the "worst case" saving would be 20+min and "best case" probably towards an hour!

Thanks to @tomhjp for a lot of good tips!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/2954 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 12/11/2025 **Status:** ✅ Merged **Merged:** 12/12/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/integration-artifact` --- ### 📝 Commits (10+) - [`5fbd31a`](https://github.com/juanfont/headscale/commit/5fbd31a62b9f4acadaa084c11ba79fc9c7f6ba9e) .github/workflows: attempt to prebuild docker containers - [`f42e55c`](https://github.com/juanfont/headscale/commit/f42e55cd476c7c0247bab1813da11dde2216f366) Dockerfile: tailscale use alpine - [`a0682d5`](https://github.com/juanfont/headscale/commit/a0682d5b41f171ea249722bfa22ed3ff7a827dd5) .github/workflows: change integration changed filter - [`716db1a`](https://github.com/juanfont/headscale/commit/716db1abfb5d73a815bcaec0e59f149d5a8d50e1) .github/workflows: remove cache when restored - [`34cc28a`](https://github.com/juanfont/headscale/commit/34cc28acd0643df8d98ad87f6d8d86d05fa48cd6) .github/workflows: simplify changed files - [`5c3d897`](https://github.com/juanfont/headscale/commit/5c3d897f6c600ccf7da2b339d2d35cae3bf3d148) .github/workflows: build containers once, reuse - [`50e5722`](https://github.com/juanfont/headscale/commit/50e5722c6e4f38297f51f58c2bbb25d00d1ed911) .github/workflows: only use hi in integration tests - [`7000e5c`](https://github.com/juanfont/headscale/commit/7000e5cf4dec1e809d407d9676561bb718a7bb37) .github/workflows: try to cache go test deps - [`7530d56`](https://github.com/juanfont/headscale/commit/7530d56baaab2b6a428af160dc9d0d82dacb9a8b) .github/workflows: no ro cache - [`62dbfbb`](https://github.com/juanfont/headscale/commit/62dbfbbfb464d98bef7ff55e2a5a0be547200acc) .github/workflows: update all integration actions ### 📊 Changes **19 files changed** (+479 additions, -241 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build.yml` (+10 -13) 📝 `.github/workflows/check-generated.yml` (+2 -2) 📝 `.github/workflows/check-tests.yaml` (+3 -4) 📝 `.github/workflows/docs-deploy.yml` (+3 -3) 📝 `.github/workflows/docs-test.yml` (+3 -3) 📝 `.github/workflows/gh-actions-updater.yaml` (+2 -2) 📝 `.github/workflows/integration-test-template.yml` (+51 -28) 📝 `.github/workflows/lint.yml` (+9 -12) 📝 `.github/workflows/nix-module-test.yml` (+3 -4) 📝 `.github/workflows/release.yml` (+5 -6) 📝 `.github/workflows/stale.yml` (+3 -5) 📝 `.github/workflows/test-integration.yaml` (+114 -0) 📝 `.github/workflows/test.yml` (+3 -4) 📝 `Dockerfile.integration` (+23 -7) ➕ `Dockerfile.integration-ci` (+17 -0) 📝 `Dockerfile.tailscale-HEAD` (+1 -1) 📝 `cmd/hi/docker.go` (+44 -12) 📝 `integration/hsic/hsic.go` (+85 -78) 📝 `integration/tsic/tsic.go` (+98 -57) </details> ### 📄 Description This PR restructures the integration tests and prebuilds all common assets used in all tests: - Headscale and Tailscale HEAD image - `hi` binary that is used to run tests - go cache is warmed up for compilation of the test This essentially means we spend 6-10 minutes building assets before any tests starts, when that is done, all tests can just sprint through. It looks like we are saving 3-9 minutes per test, and since we are limited to running max 20 concurrent tests across the repo, that means we had a lot of double work. There is currently 113 checks, so we have to do five runs of 20, and the saving should be quite noticeable! I think the "worst case" saving would be 20+min and "best case" probably towards an hour! Thanks to @tomhjp for a lot of good tips! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 04:19:50 +01:00
adam closed this issue 2025-12-29 04:19:50 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2961