Merge pull request #19 from fluxcd/e2e-check-dirty
ci: Check if working tree is dirty
This commit is contained in:
commit
95acc78577
|
|
@ -22,14 +22,24 @@ jobs:
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v2-beta
|
uses: actions/setup-go@v2-beta
|
||||||
with:
|
with:
|
||||||
go-version: 1.13.x
|
go-version: 1.14.x
|
||||||
- name: Setup Kubernetes
|
- name: Setup Kubernetes
|
||||||
uses: engineerd/setup-kind@v0.3.0
|
uses: engineerd/setup-kind@v0.3.0
|
||||||
- name: Setup Kustomize
|
- name: Setup Kustomize
|
||||||
uses: ./.github/actions/kustomize
|
uses: ./.github/actions/kustomize
|
||||||
- name: Setup Kubebuilder
|
- name: Setup Kubebuilder
|
||||||
uses: ./.github/actions/kubebuilder
|
uses: ./.github/actions/kubebuilder
|
||||||
- name: Run tests and build image
|
- name: Run tests
|
||||||
|
run: make test
|
||||||
|
env:
|
||||||
|
KUBEBUILDER_ASSETS: ${{ github.workspace }}/kubebuilder/bin
|
||||||
|
- name: Check if working tree is dirty
|
||||||
|
run: |
|
||||||
|
if [[ $(git diff --stat) != '' ]]; then
|
||||||
|
echo 'run make test and commit changes'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- name: Build container image
|
||||||
run: make docker-build IMG=test/source-controller:latest
|
run: make docker-build IMG=test/source-controller:latest
|
||||||
env:
|
env:
|
||||||
KUBEBUILDER_ASSETS: ${{ github.workspace }}/kubebuilder/bin
|
KUBEBUILDER_ASSETS: ${{ github.workspace }}/kubebuilder/bin
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -62,7 +62,7 @@ generate: controller-gen
|
||||||
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
|
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
|
||||||
|
|
||||||
# Build the docker image
|
# Build the docker image
|
||||||
docker-build: test
|
docker-build:
|
||||||
docker build . -t ${IMG}
|
docker build . -t ${IMG}
|
||||||
|
|
||||||
# Push the docker image
|
# Push the docker image
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue