chore: refactor Go projects and update CI configs #173
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: Run Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
go: [1.18, 1.19, "1.20", 1.21, 1.22] | |
name: ${{ matrix.os }} @ Go ${{ matrix.go }} | |
runs-on: ${{ matrix.os }} | |
env: | |
GO111MODULE: on | |
GOPROXY: https://proxy.golang.org | |
steps: | |
- name: Set up Go ${{ matrix.go }} | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.ref }} | |
- name: Run Testing | |
run: | | |
cd example36-performance && go test -v -bench=. ./... | |
cd example52-ring-buffer-queue && go test -v -run=^$ -benchmem -bench . ./... |