File tree Expand file tree Collapse file tree 2 files changed +28
-15
lines changed Expand file tree Collapse file tree 2 files changed +28
-15
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,15 @@ version: 2.1
22executors :
33 linux-arm64 :
44 machine :
5- image : ubuntu-2004:202104-01
5+ image : ubuntu-2004:2022.04.1
66 resource_class : arm.medium
77 working_directory : /home/circleci/go/src/github.com/fergusstrange/embedded-postgres
8-
8+ apple-m1 : &macos-executor
9+ resource_class : macos.m1.medium.gen1
10+ macos :
11+ xcode : " 14.2.0"
12+ orbs :
13+ 914jobs :
1015 platform_test :
1116 parameters :
@@ -14,14 +19,15 @@ jobs:
1419 executor : << parameters.executor >>
1520 steps :
1621 - checkout
17- - restore_cache :
18- keys :
19- - embedded-postgres-{{ checksum "/home/circleci/go/src/github.com/fergusstrange/embedded-postgres/go.mod" }}
22+ - when :
23+ condition :
24+ equal : [ *macos-executor, << parameters.executor >> ]
25+ steps :
26+ - go/install
27+ - go/load-cache
28+ - go/mod-download
29+ - go/save-cache
2030 - run : cd platform-test && go mod download && go test -v -race ./...
21- - save_cache :
22- key : embedded-postgres-{{ checksum "/home/circleci/go/src/github.com/fergusstrange/embedded-postgres/go.mod" }}
23- paths :
24- - /home/circleci/go/pkg
2531
2632workflows :
2733 version : 2
@@ -30,4 +36,6 @@ workflows:
3036 - platform_test :
3137 matrix :
3238 parameters :
33- executor : [ linux-arm64 ]
39+ executor :
40+ - linux-arm64
41+ - apple-m1
Original file line number Diff line number Diff line change 55 "fmt"
66 "os"
77 "path/filepath"
8+ "runtime"
89 "strings"
910 "testing"
1011
@@ -15,11 +16,15 @@ func Test_AllMajorVersions(t *testing.T) {
1516 allVersions := []embeddedpostgres.PostgresVersion {
1617 embeddedpostgres .V15 ,
1718 embeddedpostgres .V14 ,
18- embeddedpostgres .V13 ,
19- embeddedpostgres .V12 ,
20- embeddedpostgres .V11 ,
21- embeddedpostgres .V10 ,
22- embeddedpostgres .V9 ,
19+ }
20+
21+ if runtime .GOOS != "darwin" && runtime .GOARCH == "arm64" {
22+ allVersions = append (allVersions ,
23+ embeddedpostgres .V13 ,
24+ embeddedpostgres .V12 ,
25+ embeddedpostgres .V11 ,
26+ embeddedpostgres .V10 ,
27+ embeddedpostgres .V9 )
2328 }
2429
2530 tempExtractLocation , err := os .MkdirTemp ("" , "embedded_postgres_tests" )
You can’t perform that action at this time.
0 commit comments