Skip to content

Commit 5574a5b

Browse files
committed
Go SDK for Zowe
1 parent d092147 commit 5574a5b

33 files changed

+9515
-2
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: '1.21.x'
21+
22+
- name: Cache Go modules
23+
uses: actions/cache@v4
24+
with:
25+
path: |
26+
~/go/pkg/mod
27+
~/.cache/go-build
28+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
29+
restore-keys: |
30+
${{ runner.os }}-go-
31+
32+
- name: Tidy root module
33+
run: go mod tidy
34+
35+
- name: Run unit tests (SDK packages)
36+
run: go test -v ./pkg/...
37+
38+
# Integration tests are in a separate repository
39+
# Uncomment when integration test repository is available
40+
# - name: Tidy integration module
41+
# run: |
42+
# cd integration
43+
# go mod tidy
44+
#
45+
# - name: Run integration tests
46+
# run: |
47+
# cd integration
48+
# go test -v ./...
49+
50+
- name: Run zXplore integration test (if credentials available)
51+
if: env.ZXPLORE_HOST != ''
52+
env:
53+
ZXPLORE_HOST: ${{ secrets.ZXPLORE_HOST }}
54+
ZXPLORE_PORT: ${{ secrets.ZXPLORE_PORT }}
55+
ZXPLORE_USER: ${{ secrets.ZXPLORE_USER }}
56+
ZXPLORE_PASSWORD: ${{ secrets.ZXPLORE_PASSWORD }}
57+
run: go run test_zxplore_github.go
58+
59+

.github/workflows/zxplore-test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: zXplore Integration Test
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v5
18+
with:
19+
go-version: '1.21.x'
20+
21+
- name: Test zXplore Integration
22+
env:
23+
ZXPLORE_HOST: ${{ secrets.ZXPLORE_HOST }}
24+
ZXPLORE_PORT: ${{ secrets.ZXPLORE_PORT }}
25+
ZXPLORE_USER: ${{ secrets.ZXPLORE_USER }}
26+
ZXPLORE_PASSWORD: ${{ secrets.ZXPLORE_PASSWORD }}
27+
run: go run test_zxplore_github.go

0 commit comments

Comments
 (0)