Skip to content

feat: remote network deploy support (devnet/testnet/mainnet via HTTPS… #358

feat: remote network deploy support (devnet/testnet/mainnet via HTTPS…

feat: remote network deploy support (devnet/testnet/mainnet via HTTPS… #358

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
env:
GO_VERSION: '1.25.5'
GOWORK: off
CGO_ENABLED: "0"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Install dependencies
run: go mod download
- name: Run go vet
run: go vet ./... || true
- name: Run go fmt check
run: |
if [ -n "$(go fmt ./...)" ]; then
echo "Please run 'go fmt ./...' to format your code"
exit 1
fi
- name: Run staticcheck
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck ./... || true
test-cli:
name: Test CLI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Install dependencies
run: go mod download
- name: Run tests
run: |
# Run tests for specific packages that should pass
go test -v -coverprofile=coverage.out \
./pkg/constants/... \
./pkg/types/... \
./pkg/binutils/... \
./pkg/utils/... \
./pkg/models/... \
./cmd/... || true
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: cli-coverage
path: coverage.out
build:
name: Build
runs-on: ubuntu-latest
needs: [lint]
strategy:
matrix:
os: [linux, darwin, windows]
arch: [amd64, arm64]
exclude:
- os: windows
arch: arm64
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Build CLI
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
CGO_ENABLED: 0
run: go build -v -o bin/lux-${{ matrix.os }}-${{ matrix.arch }} .
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: lux-${{ matrix.os }}-${{ matrix.arch }}
path: bin/lux-${{ matrix.os }}-${{ matrix.arch }}
integration-test:
name: Integration Tests
runs-on: ubuntu-latest
needs: [build, test-cli]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Download Linux binary
uses: actions/download-artifact@v4
with:
name: lux-linux-amd64
path: bin/
- name: Make binary executable
run: chmod +x bin/lux-linux-amd64
- name: Run integration tests
run: |
cd tests/e2e
go test -v -timeout 30m ./...
security:
name: Security Scan
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Run gosec
uses: securego/gosec@master
with:
args: -fmt json -out gosec-report.json ./...
- name: Upload security report
uses: actions/upload-artifact@v4
with:
name: security-report
path: gosec-report.json
coverage:
name: Code Coverage
runs-on: ubuntu-latest
needs: [test-cli]
steps:
- uses: actions/checkout@v4
- name: Download CLI coverage
uses: actions/download-artifact@v4
with:
name: cli-coverage
path: ./
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.out
flags: unittests
name: codecov-cli