Files
wehub-resource-sync 36b3af2e3d
PR Check / Code Quality: Format (push) Failing after 1s
PR Check / Code Quality: Lint (darwin) (push) Failing after 0s
PR Check / Code Quality: Lint (freebsd) (push) Failing after 1s
PR Check / Code Quality: Lint (windows) (push) Failing after 1s
PR Check / Code Quality: Lint (linux) (push) Failing after 1s
PR Check / Security: Vulnerability Scan (push) Failing after 0s
Update Documentation / update-docs (push) Failing after 2s
PR Check / Code Quality: Vendor (push) Failing after 1s
PR Check / Code Quality: Coverage (push) Failing after 0s
PR Check / Tests: Unit (macos-latest) (push) Has been cancelled
PR Check / Tests: Unit (ubuntu-24.04) (push) Has been cancelled
PR Check / Tests: Unit (ubuntu-24.04-arm) (push) Has been cancelled
PR Check / Tests: Unit (windows-latest) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:22:06 +08:00

65 lines
1.6 KiB
YAML

name: Smoke Tests
on:
pull_request:
branches: [ "main", "staging" ]
permissions: read-all
jobs:
build-and-test:
name: "Build & Test"
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- os: linux
arch: amd64
runner: ubuntu-latest
- os: darwin
arch: amd64
runner: macos-latest
- os: windows
arch: amd64
runner: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25'
check-latest: true
- name: Build ${{ matrix.os }}/${{ matrix.arch }}
shell: bash
run: |
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o witr-${{ matrix.os }}-${{ matrix.arch }} ./cmd/witr
chmod +x witr-${{ matrix.os }}-${{ matrix.arch }}
- name: Verify Version
shell: bash
run: ./witr-${{ matrix.os }}-${{ matrix.arch }} --version
- name: Verify Help
shell: bash
run: ./witr-${{ matrix.os }}-${{ matrix.arch }} --help
test-freebsd:
name: "Test: FreeBSD"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Run on FreeBSD
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: pkg install -y go
run: |
go build -o witr-freebsd-amd64 ./cmd/witr
chmod +x witr-freebsd-amd64
./witr-freebsd-amd64 --version
./witr-freebsd-amd64 --help
go test ./...