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
2
2
executors :
3
3
linux-arm64 :
4
4
machine :
5
- image : ubuntu-2004:202104-01
5
+ image : ubuntu-2004:2022.04.1
6
6
resource_class : arm.medium
7
7
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
+
9
14
jobs :
10
15
platform_test :
11
16
parameters :
@@ -14,14 +19,15 @@ jobs:
14
19
executor : << parameters.executor >>
15
20
steps :
16
21
- 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
20
30
- 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
25
31
26
32
workflows :
27
33
version : 2
@@ -30,4 +36,6 @@ workflows:
30
36
- platform_test :
31
37
matrix :
32
38
parameters :
33
- executor : [ linux-arm64 ]
39
+ executor :
40
+ - linux-arm64
41
+ - apple-m1
Original file line number Diff line number Diff line change 5
5
"fmt"
6
6
"os"
7
7
"path/filepath"
8
+ "runtime"
8
9
"strings"
9
10
"testing"
10
11
@@ -15,11 +16,15 @@ func Test_AllMajorVersions(t *testing.T) {
15
16
allVersions := []embeddedpostgres.PostgresVersion {
16
17
embeddedpostgres .V15 ,
17
18
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 )
23
28
}
24
29
25
30
tempExtractLocation , err := os .MkdirTemp ("" , "embedded_postgres_tests" )
You can’t perform that action at this time.
0 commit comments