github.com/TrueCloudLab/frostfs-api-go/v2@v2.0.0-20230228134343-196241c4e79a/.github/workflows/go.yml (about) 1 name: neofs-api-go tests 2 3 on: 4 push: 5 branches: 6 - master 7 paths-ignore: 8 - '*.md' 9 pull_request: 10 branches: 11 - master 12 paths-ignore: 13 - '*.md' 14 15 jobs: 16 test: 17 runs-on: ubuntu-20.04 18 strategy: 19 matrix: 20 go: [ '1.17.x', '1.18.x', '1.19.x' ] 21 steps: 22 - name: Setup go 23 uses: actions/setup-go@v3 24 with: 25 go-version: ${{ matrix.go }} 26 27 - name: Check out code 28 uses: actions/checkout@v3 29 30 - name: Cache go mod 31 uses: actions/cache@v3 32 with: 33 path: ~/go/pkg/mod 34 key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }} 35 restore-keys: | 36 ${{ runner.os }}-go-${{ matrix.go }}- 37 38 - name: Get dependencies 39 run: make dep 40 41 - name: Run go test 42 run: go test -coverprofile=coverage.txt -covermode=atomic ./... 43 44 - name: Codecov 45 env: 46 CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} 47 run: bash <(curl -s https://codecov.io/bash) 48 49 lint: 50 runs-on: ubuntu-20.04 51 steps: 52 - name: Setup go 53 uses: actions/setup-go@v3 54 with: 55 go-version: 1.19 56 57 - name: Check out code 58 uses: actions/checkout@v3 59 60 - name: golangci-lint 61 uses: golangci/golangci-lint-action@v3 62 with: 63 version: v1.48.0 64 only-new-issues: true