Skip to content

#67 length returns the size of array or length of the string. Add `… #88

#67 length returns the size of array or length of the string. Add `…

#67 length returns the size of array or length of the string. Add `… #88

Workflow file for this run

name: Build
on:
push:
tags:
- v*
branches:
- master
pull_request:
branches:
- master
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run golangci-lint
uses: golangci/[email protected]
with:
version: v1.56.2
args: -v
test:
strategy:
matrix:
go-version: [ '1.16.x', '1.17.x', '1.18.x', '1.19.x', '1.20.x' , '1.21.x' , '1.22.x' ]
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
run: go test -json -race ./... > TestResults-${{ matrix.os }}-${{ matrix.go-version }}.json
- name: Upload Go test results
uses: actions/upload-artifact@v3
with:
name: Go-results-${{ matrix.os }}-${{ matrix.go-version }}
path: TestResults-${{ matrix.os }}-${{ matrix.go-version }}.json
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go 1.22.x on ubuntu-latest
uses: actions/setup-go@v3
with:
go-version: '1.22.x'
- name: Setup Dependencies
run: |
go get golang.org/x/tools/cmd/cover
go get -t -v ./...
- name: Run Tests
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- uses: codecov/codecov-action@v3
with:
files: ./coverage.txt
flags: unittests
fail_ci_if_error: true
verbose: true