Skip to content

test the all-in-one quickstart #145

test the all-in-one quickstart

test the all-in-one quickstart #145

Workflow file for this run

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