Merge pull request #554 from fxamacker/fxamacker/rename-bytestringmode #724
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
# GitHub Actions - CI for Go to build & test. | |
# https://github.com/fxamacker/cbor/workflows/ci.yml | |
# See ci-go-cover.yml for coverage and safer-golangci-lint.yml for linting. | |
name: ci | |
# Revoke default permissions. | |
permissions: {} | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- 'master' | |
- 'release*' | |
- 'feature/stream-mode' | |
tags: | |
- 'v*' | |
jobs: | |
# Test on various OS with default Go version. | |
tests: | |
name: test ${{matrix.os}} go-${{ matrix.go-version }} | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: read | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
go-version: [1.17, 1.19, '1.20', 1.21, 1.22] | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
go-version: ${{ matrix.go-version }} | |
check-latest: true | |
- name: Checkout code | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
fetch-depth: 1 | |
- name: Print Go version | |
run: go version | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Build project | |
run: go build ./... | |
- name: Run tests | |
run: | | |
go version | |
go test -race -v ./... |