Skip to content

Add initial pull request template #13

Add initial pull request template

Add initial pull request template #13

Workflow file for this run

name: Run E2E tests
on:
push:
branches:
- 'master'
- 'release-*'
pull_request:
branches:
- 'master'
- 'release-*'
jobs:
test-e2e:
name: Run end-to-end tests
runs-on: ubuntu-latest
strategy:
matrix:
k3s-version: [ v1.22.5 ]
# k3s-version: [v1.20.2, v1.19.2, v1.18.9, v1.17.11, v1.16.15]
steps:
- name: Download kuttl plugin
env:
KUTTL_VERSION: '0.15.0'
KUTTL_PLUGIN_SUM: 'f6edcf22e238fc71b5aa389ade37a9efce596017c90f6994141c45215ba0f862'
KUTTL_PLUGIN_FILENAME: 'kubectl-kuttl_0.15.0_linux_x86_64'
run: |
set -x
echo ${KUTTL_PLUGIN_FILENAME}
curl -OL https://github.com/kudobuilder/kuttl/releases/download/v${KUTTL_VERSION}/${KUTTL_PLUGIN_FILENAME}
echo "${KUTTL_PLUGIN_SUM} ${KUTTL_PLUGIN_FILENAME}" | sha256sum -c -
sudo mv ${KUTTL_PLUGIN_FILENAME} /usr/local/bin/kubectl-kuttl
sudo chmod +x /usr/local/bin/kubectl-kuttl
kubectl-kuttl version
- name: Install K3D
run: |
set -x
curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash
sudo mkdir -p $HOME/.kube && sudo chown -R runner $HOME/.kube
k3d cluster create --servers 3 --image rancher/k3s:${{ matrix.k3s-version }}-k3s1
kubectl version
k3d version
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Golang
uses: actions/setup-go@v1
with:
go-version: 1.19
- name: GH actions workaround - Kill XSP4 process
run: |
sudo pkill mono || true
- name: Restore go build cache
uses: actions/cache@v1
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
- name: Add /usr/local/bin to PATH
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Download Go dependencies
run: |
go mod download
- name: Run the operator locally
run: |
set -o pipefail
make install generate fmt vet
go run ./main.go 2>&1 | tee /tmp/e2e-operator-run.log &
- name: Run tests
run: |
set -o pipefail
bash make test-e2e 2>&1 | tee /tmp/e2e-test.log