update version #31
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] | |
| pull_request: | |
| branches: [master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| go-checks: | |
| name: Go checks | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Verify dependencies | |
| run: go mod verify | |
| - name: Check formatting | |
| shell: bash | |
| run: | | |
| unformatted="$(gofmt -l $(git ls-files '*.go'))" | |
| if [[ -n "${unformatted}" ]]; then | |
| echo "The following files need gofmt:" | |
| echo "${unformatted}" | |
| exit 1 | |
| fi | |
| - name: Test promotion metrics tooling | |
| run: scripts/test-promotion-metrics.sh | |
| - name: Vet packages | |
| # The MongoDB driver intentionally uses unkeyed bson.D literals. | |
| run: go vet -composites=false ./... | |
| - name: Build Linux binaries | |
| run: CGO_ENABLED=0 GOOS=linux go build ./... | |
| - name: Run self-contained unit tests | |
| run: | | |
| go test ./simulator/benchmark | |
| go test ./services/commonservices/... | |
| go test ./commons/metrics/... | |
| go test ./services/pushmanager/services/httputil | |
| vulnerability-check: | |
| name: Vulnerability check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Run govulncheck | |
| uses: golang/govulncheck-action@v1 | |
| with: | |
| # Override the action's default "stable" value so setup-go reads go.mod. | |
| go-version-input: "" | |
| go-version-file: go.mod | |
| go-package: ./... | |
| cache: true | |
| cache-dependency-path: go.sum | |
| container-build: | |
| name: Container build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Validate Compose configuration | |
| run: docker compose config --quiet | |
| - name: Build container image | |
| run: docker build --tag juggleim/im-server:ci . |