refactor(operator): feature discovery #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration tests | ||
on: | ||
workflow_call: | ||
env: | ||
KUBE_SSH_NODE_NAME: kind | ||
defaults: | ||
run: | ||
shell: bash | ||
jobs: | ||
crd-e2e: | ||
env: | ||
KIND_NAME: kube | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Detect required Go version | ||
run: | | ||
toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//') | ||
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "${{ env.GOVERSION }}" | ||
- name: Setup direnv | ||
uses: HatsuneMiku3939/direnv-action@v1 | ||
- name: Checkout akash-api | ||
run: | | ||
api_ver=$(go list -mod=readonly -m -f '{{ .Version }}' github.com/akash-network/akash-api) | ||
pushd $(pwd) | ||
cd .. | ||
git clone https://github.com/akash-network/akash-api.git | ||
cd akash-api | ||
git checkout $api_ver | ||
popd | ||
- name: Setup akash-api 1 | ||
run: | | ||
pushd $(pwd) | ||
/opt/hostedtoolcache/direnv/2.32.1/x64/direnv allow ../akash-api | ||
cd ../akash-api | ||
# /opt/hostedtoolcache/direnv/2.32.1/x64/direnv export gha >> "$GITHUB_ENV" | ||
popd | ||
- name: Setup akash-api 2 | ||
run: | | ||
pushd $(pwd) | ||
cd ../akash-api | ||
make modvendor | ||
popd | ||
printf "use (\n\t.\n)\n" > go.work | ||
printf "\ngo ${{ env.GOVERSION }}\n" >> go.work | ||
printf "\nreplace (\n\tgithub.com/akash-network/akash-api => ../akash-api\n)\n" >> go.work | ||
cat go.work | ||
- name: Setup direnv | ||
uses: HatsuneMiku3939/direnv-action@v1 | ||
- name: Fetch kind version from go modules | ||
run: echo "KIND_VERSION=$(go list -mod=readonly -m -f '{{ .Version }}' sigs.k8s.io/kind)" >> $GITHUB_ENV | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Go mod tidy | ||
run: go mod tidy | ||
- name: Make node scripts executable | ||
run: make chmod-akash-scripts | ||
- uses: helm/kind-action@v1 | ||
with: | ||
version: "${{ env.KIND_VERSION }}" | ||
node_image: "kindest/node:${{ env.KINDEST_VERSION }}" | ||
cluster_name: "${{ env.KIND_NAME }}" | ||
config: ./_run/kube/kind-config.yaml | ||
- name: Configure Kind cluster | ||
run: KUSTOMIZE_INSTALLS=akash-operator-inventory make -s -C _run/kube kube-cluster-setup-e2e-ci | ||
- name: k8s-ingress | ||
run: make -s -C _run/kube kind-k8s-ip | ||
- name: Kube Environment | ||
run: | | ||
kubectl config view | ||
kubectl cluster-info | ||
kubectl get pods,ingress,svc -A | ||
__pod=$(kubectl -n akash-services get pods -l akash.network/component=operator -l akash.network/component=inventory -l app.kubernetes.io/name=operator-inventory-node --no-headers -o custom-columns=":metadata.name") | ||
make -s -C _run/kube kube-deployment-rollout-operator-inventory | ||
kubectl -n akash-services port-forward --address 0.0.0.0 pod/${__pod} 8444:8081 & | ||
./script/inventory-test.sh --host=localhost:8444 --mode=plaintext akash.inventory.v1.NodeRPC/QueryNode | ||
- name: Run E2E Tests | ||
run: make test-e2e-integration | ||
- name: Run K8s Tests | ||
run: make test-k8s-integration | ||
- name: Post-Run Kube Environment | ||
run: | | ||
kubectl get ns,pods,ingress,svc -A |