Skip to content

Commit fc7f790

Browse files
committed
ci: aarch64 csv plugin
add x-arch tests
1 parent 27d01f8 commit fc7f790

File tree

5 files changed

+48
-14
lines changed

5 files changed

+48
-14
lines changed

.cirrus.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
test: &TEST
2+
test_script: make test
3+
4+
linux_arm64_task:
5+
env:
6+
SKIP_PLUGIN_AVRO: "true"
7+
matrix:
8+
- VERSION: 1.19
9+
- VERSION: 1.20
10+
- VERSION: 1.21
11+
# name: Tests (Go $VERSION)
12+
arm_container:
13+
image: golang:$VERSION
14+
<<: *TEST
15+
16+
macos_arm64_task:
17+
macos_instance:
18+
image: ghcr.io/cirruslabs/macos-ventura-base:latest
19+
golang_pre_req_script: brew install go@$VERSION
20+
cirrus_cli_pre_req_script: chmod +x scripts/*.sh
21+
plugin_protobuf_pre_req_script: brew install protobuf
22+
# plugin_avro_pre_req_script: brew install openjdk@17 && java --version
23+
env:
24+
PATH: "/opt/homebrew/opt/go@$VERSION/bin:$PATH" # Needed golang
25+
# PATH: "/opt/homebrew/opt/openjdk@17/bin:$PATH" # Needed for Avro Plugin
26+
SKIP_PLUGIN_AVRO: "true"
27+
matrix:
28+
- VERSION: 1.19
29+
- VERSION: 1.20
30+
- VERSION: 1.21
31+
<<: *TEST

.github/workflows/test.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ jobs:
7676
uses: actions/setup-go@v4
7777
with:
7878
go-version: ${{ matrix.go-version }}
79-
- uses: actions/setup-java@v3 # Needed for the Avro example
80-
with:
81-
distribution: 'zulu'
82-
java-version: '17'
83-
- run: make test
79+
- run: make test
80+
env:
81+
SKIP_PLUGIN_AVRO: true

Makefile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ PACT_CLI="docker run --rm -v ${PWD}:${PWD} -e PACT_BROKER_BASE_URL=$(DOCKER_HOST
77

88
ifeq ($(OS),Windows_NT)
99
EXT=.exe
10-
SKIP_PLUGIN_AVRO=true
1110
endif
1211

1312
ci:: docker deps clean bin test pact
@@ -46,13 +45,15 @@ deps: download_plugins
4645
cd -
4746

4847
download_plugins:
49-
@echo "--- 🐿 Installing plugins"; \
50-
./scripts/install-cli.sh
51-
$$HOME/.pact/bin/pact-plugin-cli$(EXT) -y install https://github.com/pactflow/pact-protobuf-plugin/releases/tag/v-0.3.4
52-
$$HOME/.pact/bin/pact-plugin-cli$(EXT) -y install https://github.com/pact-foundation/pact-plugins/releases/tag/csv-plugin-0.0.1
53-
$$HOME/.pact/bin/pact-plugin-cli$(EXT) -y install https://github.com/mefellows/pact-matt-plugin/releases/tag/v0.0.9
54-
if [ -z "$$SKIP_PLUGIN_AVRO" ]; then\
55-
$$HOME/.pact/bin/pact-plugin-cli$(EXT) -y install https://github.com/austek/pact-avro-plugin/releases/tag/v0.0.3; \
48+
if [ -z $$SKIP_PLUGINS ]; then\
49+
echo "--- 🐿 Installing plugins";\
50+
./scripts/install-cli.sh;\
51+
$$HOME/.pact/bin/pact-plugin-cli$(EXT) -y install https://github.com/pactflow/pact-protobuf-plugin/releases/tag/v-0.3.4;\
52+
$$HOME/.pact/bin/pact-plugin-cli$(EXT) -y install https://github.com/you54f/pact-plugins/releases/tag/csv-plugin-0.0.4;\
53+
$$HOME/.pact/bin/pact-plugin-cli$(EXT) -y install https://github.com/mefellows/pact-matt-plugin/releases/tag/v0.0.9;\
54+
if [ -z $$SKIP_PLUGIN_AVRO ]; then\
55+
$$HOME/.pact/bin/pact-plugin-cli$(EXT) -y install https://github.com/austek/pact-avro-plugin/releases/tag/v0.0.3; \
56+
fi \
5657
fi
5758

5859
cli:

message/v4/asynchronous_message_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func TestAsyncTypeSystem(t *testing.T) {
6464
ExpectsToReceive("some csv content").
6565
UsingPlugin(PluginConfig{
6666
Plugin: "csv",
67-
Version: "0.0.1",
67+
Version: "0.0.3",
6868
}).
6969
WithContents(csvInteraction, "text/csv").
7070
// StartTransport("notarealtransport", "127.0.0.1", nil).

scripts/install-cli.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ set -e # Needed for Windows bash, which doesn't read the shebang
99

1010
function detect_osarch() {
1111
case $(uname -sm) in
12+
'Linux aarch64')
13+
os='linux'
14+
arch='aarch64'
15+
;;
1216
'Linux x86_64')
1317
os='linux'
1418
arch='x86_64'

0 commit comments

Comments
 (0)