From fda96e4efdde63fa8a0fd39fc494521d8314f228 Mon Sep 17 00:00:00 2001 From: Woodrow Melling Date: Tue, 30 Jun 2026 16:03:56 -0600 Subject: [PATCH] Use Tangled microVM CI with GitHub auth --- .tangled/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/.tangled/workflows/ci.yml b/.tangled/workflows/ci.yml index 3b5f9ba..6b671d0 100644 --- a/.tangled/workflows/ci.yml +++ b/.tangled/workflows/ci.yml @@ -4,8 +4,37 @@ when: - event: ["pull_request"] branch: ["main"] -engine: tack +engine: microvm +image: nixos -tack: - buildkite: - pipeline: swift-composable-forms +virtualisation: + docker: true + +steps: + - name: "Build and test" + command: | + set -eu + + test -n "${GITHUB_TOKEN:-}" || { + echo "GITHUB_TOKEN is empty. Add it in Tangled repository Settings -> Secrets." + exit 1 + } + + docker run --rm \ + --env GITHUB_TOKEN \ + --volume "$PWD":/workdir \ + --workdir /workdir \ + swift:6.3-noble \ + bash -lc ' + set -euo pipefail + export GIT_TERMINAL_PROMPT=0 + + printf "machine github.com\nlogin x-access-token\npassword %s\n" "$GITHUB_TOKEN" > ~/.netrc + chmod 600 ~/.netrc + + git config --global credential.helper store + printf "https://x-access-token:%s@github.com\n" "$GITHUB_TOKEN" > ~/.git-credentials + + git ls-remote https://github.com/pointfreeco/TCA26 HEAD >/dev/null + swift build && swift test + ' -- 2.51.2