Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nikandfor committed Oct 11, 2024
1 parent 75a88e8 commit 8fdbed0
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
jobs:
go1.23: &base
docker:
- image: cimg/go:1.23
steps:
- run: go version
- checkout
- run: go test -race -v ./...

go1.22:
<<: *base
docker:
- image: cimg/go:1.22

workflows:
version: 2
build:
jobs:
- go1.23
- go1.22
48 changes: 48 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Go

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
test:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
go-ver: ["1.23", "1.22"]
include:
- os: "ubuntu-latest"
go-ver: "1.23"
cover: true

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-ver }}

- name: Build
run: go build -v ./...

- name: Test without Cover
run: go test -v ./...
if: ${{ !matrix.cover }}

- name: Test with Cover
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
if: ${{ matrix.cover }}

- name: Test Race
run: go test -race -v ./...

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
if: ${{ matrix.cover }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 8fdbed0

Please sign in to comment.