Skip to content

Version Packages

Version Packages #935

name: pull-request-main
on:
merge_group:
pull_request:
branches:
- main
jobs:
ci-lint:
name: Lint
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
actions: read
steps:
- name: Linting Go
uses: smartcontractkit/.github/actions/ci-lint-go@ci-lint-go/v2 # ci-lint-go@2.0.0
with:
only-new-issues: "false"
golangci-lint-version: v2.1.6
ci-lint-misc:
name: Lint GH Actions and scripts
runs-on: ubuntu-latest
steps:
- name: Linting Misc (yaml + sh files)
uses: smartcontractkit/.github/actions/ci-lint-misc@eeb76b5870e3c17856d5a60fd064a053c023b5f5 # ci-lint-misc@1.0.0
ci-test:
name: Tests
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
actions: read
steps:
- name: Build and test
uses: smartcontractkit/.github/actions/ci-test-go@eeb76b5870e3c17856d5a60fd064a053c023b5f5 # ci-test-go@1.0.0
with:
# disable the checkptr runtime check due a false positive in github.com/xssnick/tonutils-go
# causing tests in ci to fail "fatal error: checkptr: pointer arithmetic result points to invalid allocation"
# https://github.com/xssnick/tonutils-go/issues/310
go-test-cmd: go test -race -gcflags=all=-d=checkptr=0 -coverprofile=coverage.txt $(go list ./...)
use-go-cache: true
sonarqube:
name: Sonar Scan
if: github.event_name == 'pull_request'
runs-on: ubuntu-24.04
needs: [ ci-test, ci-lint-misc, ci-lint ]
steps:
- name: Scan with Sonarqube
uses: smartcontractkit/.github/actions/ci-sonarqube-go@01d931b0455a754d12e7143cc54a5a3521a8f6f6 # ci-sonarqube-go@0.3.1
with:
sonar-token: ${{ secrets.SONAR_TOKEN }}
sonar-host-url: ${{ secrets.SONAR_HOST_URL }}