name: Integration test on: pull_request: push: jobs: integration-test: runs-on: ubuntu-latest strategy: matrix: k8s_version: [v1.18.2, v1.17.5, v1.16.9] steps: - name: Checkout uses: actions/checkout@v2 - name: Setup Docker uses: docker-practice/actions-setup-docker@0.0.1 with: docker_version: 18.09 docker_channel: stable docker_daemon_json: '{"insecure-registries":["0.0.0.0/0"]}' - name: Create kind cluster uses: helm/kind-action@v1.0.0-rc.1 with: version: v0.8.1 node_image: kindest/node:${{ matrix.k8s_version }} cluster_name: kind-cluster-${{ matrix.k8s_version }} config: test/integration/kind-cluster.yaml - name: Install Nginx ingress controller run: | kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/ingress-nginx-2.3.0/deploy/static/provider/kind/deploy.yaml kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=120s - name: Set up Go 1.13 uses: actions/setup-go@v2 with: go-version: 1.13 - name: Cache go mod uses: actions/cache@v2 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - name: Set /etc/hosts run: | sudo -- sh -c "echo '127.0.0.1 harbor.local' >> /etc/hosts" sudo -- sh -c "echo '127.0.0.1 notary.harbor.local' >> /etc/hosts" - name: Run integration tests working-directory: ./test run: go test -v -timeout 30m github.com/goharbor/harbor-helm/integration