Skip to content

Commit

Permalink
Merge add tests for old go versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rekby authored Jun 10, 2022
2 parents e71ebf8 + ef063c6 commit dcda94e
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,41 @@ on:
branches: [ master ]

jobs:

test:
env:
GO_VERSION: "1.18"
strategy:
matrix:
goVersion:
- "1.16"
- "1.17"
- "1.18"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: ${{ matrix.goVersion }}

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

- name: Test
run: go test -race -covermode atomic -coverprofile=covprofile.out ./...
run: go test -test.count=10 -race -covermode atomic -coverprofile=covprofile.out ./...

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest

- name: Coveralls install goveralls
if: ${{ matrix.goVersion == env.GO_VERSION }}
run: go install github.com/mattn/goveralls@latest

- name: Coveralls push
if: ${{ matrix.goVersion == env.GO_VERSION }}
run: goveralls -coverprofile=covprofile.out -service=github
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions env_generic_sugar.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//go:build go1.18
// +build go1.18

package fixenv

Expand Down
1 change: 1 addition & 0 deletions env_generic_sugar_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//go:build go1.18
// +build go1.18

package fixenv

Expand Down
3 changes: 3 additions & 0 deletions examples/custom_env/custom_env_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.18
// +build go1.18

package custom_env

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.18
// +build go1.18

package custom_env_with_shared_content

import (
Expand Down
3 changes: 3 additions & 0 deletions examples/simple/http_server_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.18
// +build go1.18

package simple

import (
Expand Down
3 changes: 3 additions & 0 deletions examples/simple/package_scope_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.18
// +build go1.18

package simple

import (
Expand Down
3 changes: 3 additions & 0 deletions examples/simple/simple_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.18
// +build go1.18

package simple

import (
Expand Down

0 comments on commit dcda94e

Please sign in to comment.