Skip to content
edgesync Artifact [a565e591f6]
Login

Artifact [a565e591f6]

Artifact a565e591f6f09a73bc63aee768b7b9bf297a1c52552bf8add98c0a18b0d3c1f2:


name: CI

on:
  push:
    branches: [main]
    paths-ignore:
      - '**.md'
      - 'docs/**'
      - 'wrangler.jsonc'
      - 'LICENSE'
  pull_request:
    branches: [main]
    paths-ignore:
      - '**.md'
      - 'docs/**'
      - 'wrangler.jsonc'
      - 'LICENSE'

env:
  GOWORK: "off"

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-go@v5
        with:
          go-version-file: go.mod

      - name: Vet
        run: |
          go vet ./...
          cd leaf && go vet ./...
          cd ../bridge && go vet ./...

      - name: Unit tests (leaf + bridge in parallel)
        run: |
          cd leaf && go test ./... -short -count=1 &
          PID_LEAF=$!
          cd bridge && go test ./... -short -count=1 &
          PID_BRIDGE=$!
          wait $PID_LEAF
          wait $PID_BRIDGE

      - name: CLI build
        run: go build -buildvcs=false ./cmd/edgesync/

      - name: CLI tests
        run: go test -buildvcs=false ./cmd/edgesync/ -count=1 -timeout=60s