π Prepare v0.8.0-rc1 release #71
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: [master, develop] | |
| pull_request: | |
| branches: [master] | |
| # Set default permissions for all jobs | |
| permissions: | |
| contents: read | |
| packages: read | |
| jobs: | |
| lint: | |
| name: Lint | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| go-version: ['1.24'] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive # Checkout submodules for novnc embedding | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/go/pkg/mod | |
| ~/go/bin | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v6 | |
| with: | |
| version: latest | |
| args: --timeout=5m | |
| test: | |
| name: Test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| go-version: ['1.24'] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive # Checkout submodules for novnc embedding | |
| - name: Set up Go ${{ matrix.go-version }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/go/pkg/mod | |
| ~/go/bin | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Run tests | |
| run: | | |
| go test -v -race -coverprofile=coverage.out -covermode=atomic ./... | |
| go tool cover -func=coverage.out | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.out | |
| fail_ci_if_error: false | |
| build: | |
| name: Build | |
| needs: [test] # Only depend on test, not lint | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| go-version: ['1.24'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive # Checkout submodules for novnc embedding | |
| - name: Set up Go ${{ matrix.go-version }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/go/pkg/mod | |
| ~/go/bin | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Build binary (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| New-Item -ItemType Directory -Force -Path dist | |
| go build -ldflags="-s -w" -o ./dist/proxmox-tui.exe ./cmd/proxmox-tui | |
| - name: Build binary (Unix) | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| mkdir -p dist | |
| go build -ldflags="-s -w" -o ./dist/proxmox-tui ./cmd/proxmox-tui | |
| - name: List built files (debug) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| Write-Host "Contents of dist directory:" | |
| Get-ChildItem .\dist\ | |
| - name: List built files (debug) | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| echo "Contents of dist directory:" | |
| ls -la dist/ | |
| - name: Test binary (Unix) | |
| if: matrix.os != 'windows-latest' | |
| run: ./dist/proxmox-tui --help | |
| - name: Test binary (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| if (Test-Path ".\dist\proxmox-tui.exe") { | |
| .\dist\proxmox-tui.exe --help | |
| } else { | |
| Write-Error "Binary not found at .\dist\proxmox-tui.exe" | |
| Get-ChildItem .\dist\ | |
| exit 1 | |
| } | |
| - name: Upload artifacts | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: binary-${{ matrix.os }} | |
| path: dist/ | |
| if-no-files-found: error |