58 lines
2.0 KiB
YAML
58 lines
2.0 KiB
YAML
name: e2e
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
kind:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Restore Go cache
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v2-beta
|
|
with:
|
|
go-version: 1.13.x
|
|
- name: Setup Kubernetes
|
|
uses: engineerd/setup-kind@v0.3.0
|
|
- name: Setup Kustomize
|
|
uses: ./.github/actions/kustomize
|
|
- name: Setup Kubebuilder
|
|
uses: ./.github/actions/kubebuilder
|
|
- name: Run tests and build image
|
|
run: make docker-build IMG=test/source-controller:latest
|
|
env:
|
|
KUBEBUILDER_ASSETS: ${{ github.workspace }}/kubebuilder/bin
|
|
- name: Load test image
|
|
run: kind load docker-image test/source-controller:latest
|
|
- name: Deploy controller
|
|
run: make dev-deploy IMG=test/source-controller:latest
|
|
env:
|
|
KUBEBUILDER_ASSETS: ${{ github.workspace }}/kubebuilder/bin
|
|
- name: Run smoke tests
|
|
run: |
|
|
kubectl apply -f ./config/samples
|
|
kubectl -n source-system rollout status deploy/source-controller --timeout=1m
|
|
kubectl wait gitrepository/gitrepository-sample --for=condition=ready --timeout=1m
|
|
kubectl wait helmrepository/helmrepository-sample --for=condition=ready --timeout=1m
|
|
kubectl wait helmchart/helmchart-sample --for=condition=ready --timeout=1m
|
|
kubectl -n source-system logs deploy/source-controller
|
|
- name: Debug failure
|
|
if: failure()
|
|
run: |
|
|
kubectl get gitrepositories -oyaml
|
|
kubectl get helmrepositories -oyaml
|
|
kubectl get helmcharts -oyaml
|
|
kubectl -n source-system get all
|
|
kubectl -n source-system logs deploy/source-controller
|