Update README.md #47
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: CI | |
on: | |
- push | |
- pull_request | |
jobs: | |
test: | |
strategy: | |
matrix: | |
platform: | |
- Linux | |
- macOS | |
- Windows | |
go-version: | |
- '1.18' | |
- '1.19' | |
- '1.20' | |
include: | |
- platform: Linux | |
os: ubuntu-latest | |
- platform: macOS | |
os: macos-latest | |
- platform: Windows | |
os: windows-latest | |
fail-fast: false | |
name: Go ${{ matrix.go-version }} on ${{ matrix.platform }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
steps: | |
- name: Setup Git | |
run: git config --global core.autocrlf false | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
- name: Download modules | |
run: go mod download | |
- name: Install dependencies | |
run: npm install | |
- name: Test | |
run: go test -v -race -coverprofile coverage.txt ./... | |
- name: Vet | |
run: go vet ./... | |
- name: Test core modules | |
run: npm run cover | |
- name: Lint core modules | |
run: npm run lint | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
flags: ${{ matrix.platform }} | |
env_vars: GO | |
env: | |
GO: ${{ matrix.go-version }} |