Skip to content

Commit 2de1f97

Browse files
committed
feat(ci): add cross-platform testing workflow
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
1 parent e184a37 commit 2de1f97

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,14 @@ jobs:
196196
image_repo: ghcr.io/agntcy
197197
image_tag: ${{ github.sha }}
198198

199+
cross-platform:
200+
name: Cross-Platform Test
201+
needs:
202+
- lint
203+
- license
204+
- verify
205+
uses: ./.github/workflows/reusable-test-e2e-cross-platform.yaml
206+
199207
upload-codecov:
200208
name: Upload all coverage artifacts to Codecov
201209
needs: [test]
@@ -276,6 +284,7 @@ jobs:
276284
- test
277285
- upload-codecov
278286
- release
287+
- cross-platform
279288
runs-on: ubuntu-latest
280289
steps:
281290
- name: Echo Success
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Test E2E Cross-Platform
5+
6+
on:
7+
workflow_call:
8+
9+
jobs:
10+
cross-platform:
11+
name: Cross-Platform Test ${{ matrix.label }}
12+
runs-on: ${{ matrix.runner }}
13+
defaults:
14+
run:
15+
shell: bash
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- runner: ubuntu-latest
21+
label: Linux
22+
- runner: macos-latest
23+
label: macOS
24+
- runner: windows-latest
25+
label: Windows
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Install Task
33+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 #v2.0.0
34+
35+
- name: Setup Cosign
36+
uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1
37+
38+
- name: Setup Go
39+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
40+
with:
41+
go-version: "1.26.1"
42+
cache-dependency-path: "**/*.sum"
43+
cache: true
44+
45+
- name: Compile CLI
46+
run: task cli:compile
47+
48+
- name: Run daemon smoke tests (default backend)
49+
env:
50+
DIRECTORY_CLIENT_SERVER_ADDRESS: localhost:8888
51+
run: |
52+
if [[ "$RUNNER_OS" == "Windows" ]]; then
53+
DIRCTL_BIN=".bin/dirctl.exe"
54+
else
55+
DIRCTL_BIN=".bin/dirctl"
56+
fi
57+
58+
DATA_DIR=$(mktemp -d)
59+
60+
"$DIRCTL_BIN" daemon start --data-dir "$DATA_DIR" &
61+
62+
go test -C ./tests/e2e/daemon . -v -failfast -test.v -test.paniconexit0 -ginkgo.timeout 5m -timeout 5m -ginkgo.v

0 commit comments

Comments
 (0)