-
Notifications
You must be signed in to change notification settings - Fork 172
77 lines (67 loc) · 2.12 KB
/
test-quickstart.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Test Quickstart
on:
workflow_dispatch:
# test quickstart changes after merge
push:
branches:
- release-next
- main
paths:
- 'quickstart/**'
# test quickstart changes before merge
pull_request:
paths:
- 'quickstart/**'
# cancel older, redundant runs of same workflow on same branch
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
expressInstallTest:
name: Test expressInstall() Quickstart
runs-on: ubuntu-latest
steps:
- name: Shallow checkout
uses: actions/checkout@v3
- name: Install zsh
shell: bash
run: sudo apt-get update && sudo apt-get install --yes zsh
- name: Build and run a quickstart container image
shell: bash
run: ./quickstart/test/compose-test.zsh
allInOneTest:
name: Test all-in-one Quickstart
runs-on: ubuntu-latest
env:
ZITI_QUICK_TAG: local
ARTIFACTS_DIR: ${{ github.workspace }}/build
steps:
- name: Shallow checkout
uses: actions/checkout@v3
- name: Install Go
id: setup-go
uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
- name: Build ziti executable
shell: bash
run: |
mkdir -pv ${{ env.ARTIFACTS_DIR }}
go build -o ${{ env.ARTIFACTS_DIR }} ./...
- name: Run the all-in-one quickstart with locally-built ziti executable
shell: bash
working-directory: ./quickstart/docker/all-in-one
run: ZITI_UID=$UID docker compose up --build --detach
- name: Wait for all-in-one quickstart controller then run quickstart tests
shell: bash
working-directory: ./quickstart/docker/all-in-one
env:
ZITI_GO_VERSION: ${{ steps.setup-go.outputs.go-version }}
run: ZITI_UID=$UID docker compose --profile test run --rm quickstart-tests
- name: Print debug info
if: always()
shell: bash
working-directory: ./quickstart/docker/all-in-one
run: |
docker compose logs
docker compose --profile test logs