mirror of https://github.com/goccy/go-json.git
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Go
|
|
on: [push, pull_request]
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
strategy:
|
|
matrix:
|
|
os: [ "ubuntu-latest", "windows-latest", "macos-latest" ]
|
|
go-version: [ "1.13", "1.14", "1.15" ]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: setup Go ${{ matrix.go-version }}
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
- name: simple test
|
|
run: go test -v ./ -count=1
|
|
- name: test with GC pressure
|
|
run: go test -v ./ -count=1
|
|
env:
|
|
GOGC: 1
|
|
- name: test with race detector
|
|
if: ${{ matrix.os != 'windows-latest' }}
|
|
run: go test -v -race ./ -count=1
|
|
coverage:
|
|
name: Coverage
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: setup Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.15
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
- name: measure coverage
|
|
run: go test -v -coverprofile=coverage.out ./ -count=1
|
|
- name: report coverage
|
|
run: |
|
|
bash <(curl -s https://codecov.io/bash)
|