From b145d03192c50a80e0dca270b024eebcdbeb8bdd Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Fri, 13 Aug 2021 16:36:10 +0200 Subject: [PATCH] Update CI workflow to test documentation Signed-off-by: Tom Chauveau --- .github/workflows/ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e249dc4..fedc5589 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,3 +185,57 @@ jobs: with: name: cypress-videos path: website/cypress/videos + doc: + name: Documentation + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Check out + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.16 + + - name: Install Dependencies + run: | + # Cue + export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2)" + export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz" + echo "Installing cue version $CUE_VERSION" + curl -L https://github.com/cuelang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin + + - name: Run local registry + run: | + docker run -d -p 5000:5000 --name registry registry:2 + + - name: Write kind echo + run: | + echo 'kind: Cluster + apiVersion: kind.x-k8s.io/v1alpha4 + containerdConfigPatches: + - |- + [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"] + endpoint = ["http://registry:5000"]' > ./kind-config.yaml + cat ./kind-config.yaml + + - name: Setup Kind Kubernetes Cluster + uses: helm/kind-action@v1.2.0 + with: + config: "./kind-config.yaml" + + - name: Connect registry to cluster + run: | + docker network connect kind registry + + - name: Import Dagger private key + env: + DAGGER_AGE_KEY: ${{ secrets.DAGGER_AGE_KEY }} + run: | + mkdir -p ~/.config/dagger + echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt + + - name: Documentation Test + run: | + make doc-test