Support Len
to return size of string, slice, array or map
#54
This file contains 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: Go | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# This enables a "Run workflow" button on the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
go-version: [ 1.13, 1.18 ] | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Run tests | |
run: make test-race fmt vet | |
- name: Upload coverage to Codecov | |
if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' && matrix.go-version == '1.13' }} | |
run: | | |
go test -coverprofile=coverage.txt -covermode=atomic ./... | |
bash <(curl -s https://codecov.io/bash) |