Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Backport of Waypoint docs updates into release/0.11.x #567

Backport of Waypoint docs updates into release/0.11.x

Backport of Waypoint docs updates into release/0.11.x #567

Workflow file for this run

name: integration
on:
pull_request:
permissions:
contents: read
jobs:
build-frontend:
runs-on: ubuntu-latest
outputs:
yarn-cache-key: ${{ steps.set-cache-key.outputs.cache-key}}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: set-cache-key
id: set-cache-key
run: echo "cache-key=waypoint-ui-v1-${{ hashFiles('ui/yarn.lock', 'ui/lib/**') }}" | tee -a "${GITHUB_OUTPUT}"
- name: save ui cache
id: ui-cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
key: "${{ steps.set-cache-key.outputs.cache-key }}"
path: |-
ui/node_modules
ui/lib/node_modules
ui/dist/
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
if: steps.ui-cache.outputs.cache-hit == false
with:
node-version: 14
- name: install yarn packages
if: steps.ui-cache.outputs.cache-hit == false
run: yarn install
working-directory: ui
- name: Make UI
if: steps.ui-cache.outputs.cache-hit == false
run: make
working-directory: ui
dev-build:
runs-on: ubuntu-latest
needs:
- build-frontend
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version-file: go.mod
- name: Restore UI cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
key: ${{ needs.build-frontend.outputs.yarn-cache-key }}
path: |-
ui/node_modules
ui/lib/node_modules
ui/dist/
- name: Make static assets (bindata_ui)
run: |-
go install github.com/kevinburke/go-bindata/...
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
make static-assets
- name: Make waypoint binary
run: |-
make bin
tar -cvf waypoint.tar ./waypoint
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
path: waypoint.tar
name: waypoint.tar
integration:
needs:
- dev-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Setup k3s
run: |-
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION="v1.26.3+k3s1" INSTALL_K3S_EXEC="--docker --disable=traefik --write-kubeconfig-mode=664" sh -
- name: Wait for kubernetes
run: |-
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
timeout 60s bash -c 'trap "echo Failed, timeout reached while waiting for kubernetes to launch 1>&2" SIGTERM; while ! kubectl get node 2>/dev/null ; do sleep 1 ; done; echo "Connected, ok"'
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: waypoint.tar
- name: Execute Integration Tests
run: |-
tar -xvf waypoint.tar
./ci/integration.sh