Merge pull request #106 from balajz/dependabot/go_modules/charm.land/… #238
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: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'go.mod' | |
| - 'go.sum' | |
| - 'internal/**' | |
| - 'cmd/**' | |
| pull_request: | |
| paths: | |
| - 'go.mod' | |
| - 'go.sum' | |
| - 'internal/**' | |
| - 'cmd/**' | |
| jobs: | |
| test: | |
| name: Run Tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| go-version: ["1.26.4"] | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| CGO_ENABLED: 0 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache: true | |
| - name: Run Unit Tests | |
| run: go test -v ./... | |
| - name: Run Integration Tests | |
| if: matrix.os == 'ubuntu-latest' | |
| run: go test -v -tags=integration ./... | |
| - name: Race Test (Integration) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: go test -race -v -tags=integration ./... | |
| env: | |
| CGO_ENABLED: 1 | |
| compatibility-build: | |
| name: Cross-Compile Build | |
| needs: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| go-version: ["1.26.4"] | |
| platform: | |
| - os: ubuntu-latest | |
| arch: amd64 | |
| - os: macos-latest | |
| arch: arm64 | |
| - os: windows-latest | |
| arch: amd64 | |
| runs-on: ${{ matrix.platform.os }} | |
| env: | |
| GOARCH: ${{ matrix.platform.arch }} | |
| CGO_ENABLED: 0 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache: true | |
| - name: Build | |
| run: go build ./... |