Set bevel 1.10 #680
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: Tests | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test-main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Build Fablo | |
run: | | |
shellcheck --version && \ | |
yamllint -v && \ | |
npm install && \ | |
npm run build && \ | |
./fablo-build.sh | |
- name: Test simple network | |
run: e2e-network/docker/test-01-simple.sh | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: test-main | |
path: | | |
e2e-network/docker/test-01-simple.sh.logs/* | |
e2e-network/docker/test-01-simple.sh.tmpdir/fablo-target/**/* | |
- name: Test generators | |
run: | | |
npm run test:unit && \ | |
npm run test:e2e && \ | |
./check-if-fablo-version-matches.sh | |
- name: Lint | |
run: npm run lint && ./lint.sh | |
test-k8: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Set up Krew for kubectl and Helm | |
run: | | |
# Install kubectl | |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
chmod +x kubectl | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
# Install Krew | |
set -x; cd "$(mktemp -d)" | |
OS="$(uname | tr '[:upper:]' '[:lower:]')" | |
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" | |
KREW="krew-${OS}_${ARCH}" | |
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" | |
tar zxvf "${KREW}.tar.gz" | |
"$PWD/$KREW" install krew | |
export PATH="$HOME/.krew/bin:$PATH" | |
kubectl krew version | |
# Install Helm | |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash | |
- name: Create k8s Kind Cluster | |
uses: helm/[email protected] | |
with: | |
cluster_name: kind | |
node_image: kindest/node:v1.25.8 | |
config: .github/kind-config.yaml | |
- name: Install kubectl plugin # This job depends on the setup-krew job | |
run: | | |
helm version | |
export PATH=$HOME/.krew/bin:$PATH | |
kubectl krew install hlf | |
helm repo add kfs "https://kfsoftware.github.io/hlf-helm-charts" --force-update | |
helm install hlf-operator --version=1.10.0 kfs/hlf-operator | |
kubectl hlf | |
- name: Install Istio | |
run: | | |
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.16.1 TARGET_ARCH=x86_64 sh - | |
mv "$PWD/istio-1.16.1" "$HOME/.istio" | |
export PATH="$HOME/.istio/bin:$PATH" | |
kubectl create namespace istio-system | |
istioctl operator init | |
kubectl apply -f - <<EOF | |
apiVersion: install.istio.io/v1alpha1 | |
kind: IstioOperator | |
metadata: | |
name: istio-gateway | |
namespace: istio-system | |
spec: | |
addonComponents: | |
grafana: | |
enabled: false | |
kiali: | |
enabled: false | |
prometheus: | |
enabled: false | |
tracing: | |
enabled: false | |
components: | |
ingressGateways: | |
- enabled: true | |
k8s: | |
hpaSpec: | |
minReplicas: 1 | |
resources: | |
limits: | |
cpu: 500m | |
memory: 512Mi | |
requests: | |
cpu: 100m | |
memory: 128Mi | |
service: | |
ports: | |
- name: http | |
port: 80 | |
targetPort: 8080 | |
nodePort: 30949 | |
- name: https | |
port: 443 | |
targetPort: 8443 | |
nodePort: 30950 | |
type: NodePort | |
name: istio-ingressgateway | |
pilot: | |
enabled: true | |
k8s: | |
hpaSpec: | |
minReplicas: 1 | |
resources: | |
limits: | |
cpu: 300m | |
memory: 512Mi | |
requests: | |
cpu: 100m | |
memory: 128Mi | |
meshConfig: | |
accessLogFile: /dev/stdout | |
enableTracing: false | |
outboundTrafficPolicy: | |
mode: ALLOW_ANY | |
profile: default | |
EOF | |
sleep 2 | |
kubectl wait --timeout=180s --for=jsonpath='{.status.status}'=HEALTHY istiooperator istio-gateway --namespace=istio-system | |
- name: Configure DNS in Kubernetes | |
run: | | |
CLUSTER_IP=$(kubectl -n istio-system get svc istio-ingressgateway -o json | jq -r .spec.clusterIP) | |
echo "CLUSTER_IP=${CLUSTER_IP}" | |
kubectl apply -f - <<EOF | |
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: coredns | |
namespace: kube-system | |
data: | |
Corefile: | | |
.:53 { | |
errors | |
health { | |
lameduck 5s | |
} | |
rewrite name regex (.*)\.localho\.st host.ingress.internal | |
hosts { | |
${CLUSTER_IP} host.ingress.internal | |
fallthrough | |
} | |
ready | |
kubernetes cluster.local in-addr.arpa ip6.arpa { | |
pods insecure | |
fallthrough in-addr.arpa ip6.arpa | |
ttl 30 | |
} | |
prometheus :9153 | |
forward . /etc/resolv.conf { | |
max_concurrent 1000 | |
} | |
cache 30 | |
loop | |
reload | |
loadbalance | |
} | |
EOF | |
kubectl get configmap coredns -n kube-system -o yaml | |
- name: Build Fablo | |
run: | | |
shellcheck --version && \ | |
yamllint -v && \ | |
npm install && \ | |
npm run build && \ | |
./fablo-build.sh | |
- name: fablo k8 tests | |
run: | | |
export PATH="$HOME/.krew/bin:$HOME/.istio/bin:$PATH" | |
kubectl version | |
helm version | |
kubectl krew version | |
istioctl version | |
helm list | grep hlf-operator | |
e2e-network/k8s/test-01-simple-k8s.sh | |
test-02-raft: | |
needs: test-main | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Build Fablo | |
run: | | |
shellcheck --version && \ | |
yamllint -v && \ | |
npm install && \ | |
./fablo-build.sh | |
- name: Test RAFT network | |
run: e2e-network/docker/test-02-raft-2orgs.sh | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: test-02-raft | |
path: | | |
e2e-network/docker/test-02-raft.sh.logs/* | |
e2e-network/docker/test-02-raft.sh.tmpdir/fablo-target/**/* | |
test-03-private-data: | |
needs: test-main | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Build Fablo | |
run: | | |
shellcheck --version && \ | |
yamllint -v && \ | |
npm install && \ | |
./fablo-build.sh | |
- name: Test private data | |
run: e2e-network/docker/test-03-private-data.sh | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: test-03-private-data | |
path: | | |
e2e-network/docker/test-03-private-data.sh.logs/* | |
e2e-network/docker/test-03-private-data.sh.tmpdir/fablo-target/**/* | |
test-04-snapshot: | |
needs: test-main | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Build Fablo | |
run: | | |
shellcheck --version && \ | |
yamllint -v && \ | |
npm install && \ | |
./fablo-build.sh | |
- name: Test snapshots | |
run: e2e-network/docker/test-04-snapshot.sh | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: test-04-snapshot | |
path: | | |
e2e-network/docker/test-04-snapshot.sh.logs/* | |
e2e-network/docker/test-04-snapshot.sh.tmpdir/fablo-target/**/* |