Merge pull request #81 from chipmk/fix/docker-context-as-root #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Build | |
| run: make build-go | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.9.0 | |
| build-client: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: client/go.mod | |
| - name: Vet client | |
| run: go vet ./... | |
| working-directory: client | |
| - name: Lint client | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.9.0 | |
| working-directory: client | |
| - name: Build Docker image | |
| run: docker build ./client | |
| e2e: | |
| runs-on: macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Setup Docker via Colima | |
| uses: douglascamata/setup-docker-macos-action@v1 | |
| - name: Build | |
| run: make build | |
| - name: Start server | |
| run: sudo ./docker-mac-net-connect & | |
| - name: Wait for tunnel | |
| run: | | |
| for i in $(seq 1 30); do | |
| if ping -c 1 -W 1 10.33.33.2 >/dev/null 2>&1; then | |
| echo "Tunnel is up" | |
| exit 0 | |
| fi | |
| echo "Waiting for tunnel... ($i/30)" | |
| sleep 2 | |
| done | |
| echo "Tunnel failed to come up" | |
| exit 1 | |
| - name: E2E tests | |
| run: make e2e |