Skip to content

chore: dump version to 1.2.7-ecp.9 #3245

chore: dump version to 1.2.7-ecp.9

chore: dump version to 1.2.7-ecp.9 #3245

Workflow file for this run

name: Run emqx operator test case
concurrency:
group: test-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.3'
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
args: --timeout=5m
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dir:
- apis
- controllers
- pkg
- e2e/v1beta3
steps:
- run: minikube start
- uses: actions/setup-go@v2
with:
go-version: '1.18.3'
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: install kubebuilder
run: |
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m | sed 's/x86_64/amd64/')
curl -fsL "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-1.16.4-${OS}-${ARCH}.tar.gz" -o kubebuilder-tools
tar -zxvf kubebuilder-tools
sudo mv kubebuilder/ /usr/local/kubebuilder
- name: Run unit tests
run: go test -coverpkg=./... -coverprofile=cover.out --timeout=20m ./${{ matrix.dir }}/...
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=cover.out -service=github -parallel -flagname=go-test-${{ matrix.dir }}
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
deployment:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
install:
- static
- helm
emqx:
- [EmqxBroker, emqx, "config/samples/emqx/v1beta3/emqxbroker-slim.yaml"]
- [EmqxBroker, emqx, "config/samples/emqx/v1beta3/emqxbroker-full.yaml"]
- [EmqxEnterprise, emqx-ee, "config/samples/emqx/v1beta3/emqxenterprise-slim.yaml"]
- [EmqxEnterprise, emqx-ee, "config/samples/emqx/v1beta3/emqxenterprise-full.yaml"]
steps:
- run: minikube start
- name: install cert-manager
run: |
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.8.2 \
--set installCRDs=true
- uses: actions/setup-go@v2
with:
go-version: '1.18.3'
- uses: actions/checkout@v2
- name: Build image
env:
IMG: "emqx/emqx-operator-controller:${{ github.sha }}"
run: eval $(minikube docker-env) && docker build -t $IMG .
- name: Deploy controller
if: matrix.install == 'static'
env:
IMG: "emqx/emqx-operator-controller:${{ github.sha }}"
run: make deploy
- name: Deploy controller
if: matrix.install == 'helm'
run: |
helm install emqx-operator deploy/charts/emqx-operator \
--set installCRDs=true \
--set image.tag=${{ github.sha }} \
--namespace emqx-operator-system \
--create-namespace
- name: Check operator
timeout-minutes: 5
run: |
set -euo pipefail
while [ "$(kubectl get pods -l "control-plane=controller-manager" -n emqx-operator-system -o json | jq '.items[0].status.containerStatuses[] | select(.ready==true) | .containerID')" = "" ]; do
echo "waiting operator controller pod running"
sleep 1
done
- name: Deployment emqx
timeout-minutes: 5
uses: ./.github/actions/deploy-emqx
with:
kind: ${{ matrix.emqx[0] }}
name: ${{ matrix.emqx[1] }}
file: ${{ matrix.emqx[2] }}
- if: failure()
run: kubectl logs -l "control-plane=controller-manager" -n emqx-operator-system -c manager --tail=1000
- if: failure()
run: kubectl get ${{ matrix.emqx[0] }} ${{ matrix.emqx[1] }} -o json