mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-26 19:46:27 -08:00
GitHub provides a way to define problem matchers, that grep the output of a GitHub Actions workflow to extract errors and surface them when tests fail. This patch adds a .github/go-matcher.json that matches Go error messages from `go build` and `go test`, among other `go` tool output. This file was derived from matchers.json in actions/setup-go@d8cbb80. Updates #TBD Change-Id: I1f6f42fa0ada139f5742dc9a9f923cbad20bd2c9 Signed-off-by: Simon Law <[email protected]>
54 lines
2.0 KiB
YAML
54 lines
2.0 KiB
YAML
# Run the ssh integration tests in various Docker containers.
|
|
# These tests can also be run locally via `make sshintegrationtest`.
|
|
name: "ssh-integrationtest"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- "ssh/**"
|
|
# gliderssh and x/crypto/ssh bumps.
|
|
- "go.mod"
|
|
- "go.sum"
|
|
- "Makefile"
|
|
- ".github/workflows/ssh-integrationtest.yml"
|
|
schedule:
|
|
# Changes outside ssh/** (ipn/ipnlocal, util/osuser, envknob,
|
|
# cmd/tailscaled) can break Tailscale SSH without triggering the
|
|
# pull_request paths above, so also run on main daily around
|
|
# midnight UK time (cron is UTC; 00:13 GMT, 01:13 BST), so results
|
|
# are ready the next morning. Off the hour to avoid GitHub's :00
|
|
# cron backlog.
|
|
- cron: "13 0 * * *"
|
|
jobs:
|
|
ssh-integrationtest:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- base: "ubuntu:focal"
|
|
tag: "ssh-ubuntu-focal"
|
|
- base: "ubuntu:jammy"
|
|
tag: "ssh-ubuntu-jammy"
|
|
- base: "ubuntu:noble"
|
|
tag: "ssh-ubuntu-noble"
|
|
- base: "alpine:latest"
|
|
tag: "ssh-alpine-latest"
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Register Go problem matcher
|
|
run: echo '::add-matcher::.github/go-matcher.json'
|
|
- name: Build test binaries
|
|
run: |
|
|
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 ./tool/go test -tags integrationtest -c ./ssh/tailssh -o ssh/tailssh/testcontainers/tailssh.test
|
|
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 ./tool/go build -o ssh/tailssh/testcontainers/tailscaled ./cmd/tailscaled
|
|
- name: Run SSH integration tests (${{ matrix.base }})
|
|
run: |
|
|
docker build --build-arg="BASE=${{ matrix.base }}" -t "${{ matrix.tag }}" ssh/tailssh/testcontainers
|