github.com/enbility/spine-go@v0.7.0/.github/workflows/default.yml (about) 1 name: Default 2 3 env: 4 ACTION_ENVIRONMENT: CI 5 6 on: 7 push: 8 branches: 9 - dev 10 - main 11 pull_request: 12 workflow_call: 13 14 jobs: 15 build: 16 name: Build 17 runs-on: ubuntu-latest 18 19 steps: 20 - name: Checkout 21 uses: actions/checkout@v4 22 23 - name: Set up Go 24 uses: actions/setup-go@v5 25 with: 26 go-version: ^1.21 27 28 - name: Build 29 run: go build -v ./... 30 31 - name: Lint 32 uses: golangci/golangci-lint-action@master 33 with: 34 version: latest 35 skip-pkg-cache: true 36 skip-build-cache: true 37 args: --timeout=3m --issues-exit-code=0 ./... 38 39 - name: Test 40 run: go test -race -v -coverprofile=coverage_temp.out -covermode=atomic ./... 41 42 - name: Remove mocks from coverage 43 run: | 44 grep -v "/spine-go/mocks/" coverage_temp.out > coverage.out 45 46 - name: Send coverage 47 uses: coverallsapp/github-action@v2 48 with: 49 file: coverage.out 50 51 - name: Run Gosec Security Scanner 52 uses: securego/gosec@v2.20.0 53 with: 54 # we let the report trigger content trigger a failure using the GitHub Security features. 55 args: '-no-fail -fmt sarif -out results.sarif ./...' 56 - name: Upload SARIF file 57 uses: github/codeql-action/upload-sarif@v3 58 with: 59 # Path to SARIF file relative to the root of the repository 60 sarif_file: results.sarif