Skip to content

Commit

Permalink
45 add support for go 122 (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
ovechkin-dm authored Feb 16, 2024
1 parent 1acd302 commit 40f2589
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
28 changes: 5 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,12 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ darwin, linux, windows ]
os: [linux]
arch: [ amd64, arm64 ]
go: [ '1.20', '1.21' ]
go: [ '1.20', '1.21', '1.22' ]
include:
- os: darwin
runs-on: macos-latest
- os: linux
runs-on: ubuntu-22.04
- os: windows
runs-on: windows-latest
steps:
- name: Checkout scm
uses: actions/checkout@v3
Expand All @@ -71,39 +67,25 @@ jobs:
with:
go-version: ${{ matrix.go }}

- name: 'Test on darwin'
if: ${{ matrix.os == 'darwin' && contains(fromJson('["amd64"]'), matrix.arch) && matrix.go == '1.21' }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./mock/... ./...

- name: 'Test on linux [amd64]'
if: ${{ matrix.os == 'linux' && contains(fromJson('["amd64"]'), matrix.arch) }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./mock/... ./...
run: go test -v -coverprofile="coverage.txt" -coverpkg=./... ./...

- name: 'Setup qemu-user-static on [linux] arch [arm64]'
if: ${{ matrix.os == 'linux' && contains(fromJson('["arm64"]'), matrix.arch) }}
run: |
sudo apt-get update
sudo apt-get -y install qemu-user-static
- name: 'Test on [linux] arch [arm64] TODO'
- name: 'Test on [linux] arch [arm64]'
if: ${{ matrix.os == 'linux' && contains(fromJson('["arm64"]'), matrix.arch) }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go test -coverpkg=./mock/... ./...

- name: 'Test on windows'
if: ${{ matrix.os == 'windows' && contains(fromJson('["amd64"]'), matrix.arch) && matrix.go == '1.21' }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./mock/... ./...
run: go test -coverpkg=./... ./...

- name: Codecov
uses: codecov/codecov-action@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage.txt
2 changes: 1 addition & 1 deletion threadlocal/threadlocal.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ func NewThreadLocal[T any](initFunc func() T) ThreadLocal[T] {

func GoId() int64 {
return goid.Get()
}
}

0 comments on commit 40f2589

Please sign in to comment.