Update CI workflow to test documentation

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau 2021-08-13 16:36:10 +02:00 committed by Guillaume de Rouville
parent a8e218d808
commit b145d03192

View File

@ -185,3 +185,57 @@ jobs:
with: with:
name: cypress-videos name: cypress-videos
path: website/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