Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
srebhan committed Dec 8, 2023
1 parent 918f94f commit adee91e
Showing 1 changed file with 37 additions and 18 deletions.
55 changes: 37 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,25 @@ commands:
check-changed-files-or-halt:
steps:
- run: ./scripts/check-file-changes.sh
test-go-arch:
parameters:
os:
type: string
default: "linux"
arch:
type: string
default: "amd64"
steps:
- unless:
condition:
or:
- equal: [ "386", << parameters.arch >> ]
- equal: [ "darwin", << parameters.os >> ]
steps:
- run: echo 'export RACE="-race"' >> $BASH_ENV
- run:
name: "Testing << parameters.os >> << parameters.arch >>"
command: GOOS=<< parameters.os >> GOARCH=<< parameters.arch >> ./gotestsum -- -short -race -cover -coverprofile=coverage.out ./...
test-go:
parameters:
os:
Expand Down Expand Up @@ -245,18 +264,18 @@ jobs:
- run: ./scripts/install_gotestsum.sh linux gotestsum
- attach_workspace:
at: '/go'
- run:
name: "Testing linux amd64"
command: GOOS=linux GOARCH=amd64 ./gotestsum -- -short -race -cover -coverprofile=coverage.out ./...
- run:
name: "Testing linux 386"
command: GOOS=linux GOARCH=386 ./gotestsum -- -short -cover -coverprofile=coverage.out ./...
- run:
name: "Testing darwin arm64"
command: GOOS=dawin GOARCH=arm64 ./gotestsum -- -short -race -cover -coverprofile=coverage.out ./...
- run:
name: "Testing windows"
command: GOOS=windows GOARCH=amd64 ./gotestsum -- -short -race -cover -coverprofile=coverage.out ./...
- test-go-arch:
os: linux
arch: "386"
- test-go-arch:
os: linux
arch: amd64
- test-go-arch:
os: darwin
arch: arm64
- test-go-arch:
os: windows
arch: amd64
- save_cache:
name: "Save Go caches"
key: go-caches-<< parameters.cache_version >>-linux-amd64-go<< parameters.goversion >>-{{ checksum "go.sum" }}
Expand Down Expand Up @@ -351,9 +370,9 @@ jobs:
- restore_cache:
name: "Restore Go caches"
key: go-caches-<< parameters.cache_version >>-darwin-arm64-go<< parameters.goversion >>-{{ checksum "go.sum" }}
- test-go:
os: darwin
arch: arm64
# - test-go:
# os: darwin
# arch: arm64
- save_cache:
name: "Save Go caches"
key: go-caches-<< parameters.cache_version >>-darwin-arm64-go<< parameters.goversion >>-{{ checksum "go.sum" }}
Expand All @@ -378,9 +397,9 @@ jobs:
- restore_cache:
name: "Restore Go caches"
key: go-caches-<< parameters.cache_version >>-windows-amd64-go<< parameters.goversion >>-{{ checksum "go.sum" }}
- test-go:
os: windows
gotestsum: "gotestsum.exe"
# - test-go:
# os: windows
# gotestsum: "gotestsum.exe"
- save_cache:
name: "Save Go caches"
key: go-caches-<< parameters.cache_version >>-windows-amd64-go<< parameters.goversion >>-{{ checksum "go.sum" }}
Expand Down

0 comments on commit adee91e

Please sign in to comment.