Bump securego/gosec from 849570622f56a251c015c0e2417aebafc0216e17 to 1769a22fd149bfd9e5e546e06a7f9d596eab2f65 #336
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: test | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| env: | |
| GOPATH: ${{ github.workspace }} | |
| WORKSPACE: ${{ github.workspace }}/src/github.com/${{ github.repository }} | |
| jobs: | |
| test: | |
| defaults: | |
| run: | |
| working-directory: ${{ env.WORKSPACE }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| go: ["1.24", "1.25", "1.26"] | |
| name: ${{ matrix.os }} @ Go ${{ matrix.go }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| path: ${{ env.WORKSPACE }} | |
| - name: Set up Go ${{ matrix.go }} | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test | |
| run: go test -v --coverpkg=github.com/shamaton/msgpack/... --coverprofile=coverage.coverprofile.tmp --covermode=atomic ./... | |
| - name: Remove testutil from coverage | |
| shell: bash | |
| run: | | |
| cat coverage.coverprofile.tmp | grep -v testutil > coverage.coverprofile | |
| rm coverage.coverprofile.tmp | |
| - name: Upload coverage to Codecov | |
| if: success() && matrix.go == '1.25' && matrix.os == 'ubuntu-latest' | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| working-directory: ${{ env.WORKSPACE }} | |
| lint: | |
| needs: test | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| path: ${{ env.WORKSPACE }} | |
| - name: golangci-lint | |
| uses: reviewdog/action-golangci-lint@c76cceaaab89abe74e649d2e34c6c9adc26662d2 # v2.10.0 | |
| with: | |
| workdir: ${{ env.WORKSPACE }} | |
| level: warning | |
| reporter: github-pr-review |