test the all-in-one quickstart #148
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
ZITI_CTRL_EDGE_ADVERTISED_PORT: 1281 | |
ZITI_ROUTER_PORT: 3023 | |
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 ${ARTIFACTS_DIR} | |
go build -o ${ARTIFACTS_DIR} ${GITHUB_WORKSPACE}/... | |
- name: Run the all-in-one quickstart with locally-built ziti executable | |
shell: bash | |
working-directory: ./quickstart/docker/all-in-one | |
run: 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: docker compose --profile test run --rm quickstart-tests | |
- name: Print debug info | |
if: always() | |
shell: bash | |
working-directory: ./quickstart/docker/all-in-one | |
run: | | |
set +e | |
set -x | |
ls -lAn ${GOCACHE:-${HOME}/.cache/go-build}/ ${GOPATH:-${HOME}/go}/pkg/mod/ | |
docker compose --profile test logs |