Files
kubevpn/.github/workflows/test.yml
2022-02-12 22:09:28 +08:00

135 lines
3.5 KiB
YAML

name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Setup Minikube
timeout-minutes: 30
uses: medyagh/setup-minikube@master
- name: Kubernetes info
run: |
kubectl cluster-info
cat ~/.kube/config
kubectl get pods -n kube-system -o wide
- name: Install demo bookinfo
run: kubectl apply -f https://raw.githubusercontent.com/wencaiwulue/kubevpn/master/samples/bookinfo.yaml
- name: Build
run: make kubevpn-linux
- name: Wait for pods reviews to be ready
run: |
kubectl wait pods -l app=reviews --for=condition=Ready --timeout=600s
kubectl get all -o wide
kubectl get nodes -o yaml
ifconfig
route -n
- name: Test
run: go test -v ./test/
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- uses: docker-practice/actions-setup-docker@master
- name: Pull image in advance
run: |
rm '/usr/local/bin/kubectl'
set -x
docker version
docker pull naison/kubevpn:v2
docker pull naison/kubevpnmesh:v2
docker run --rm hello-world
- name: Install minikube
run: |
brew install minikube
minikube start --driver=docker
kubectl get po -A
minikube kubectl -- get po -A
- name: Kubernetes info
run: |
kubectl cluster-info
cat ~/.kube/config
kubectl get pods -n kube-system -o wide
- name: Install demo bookinfo
run: kubectl apply -f https://raw.githubusercontent.com/wencaiwulue/kubevpn/master/samples/bookinfo.yaml
- name: Build
run: make kubevpn-macos
- name: Wait for pods reviews to be ready
run: |
kubectl wait pods -l app=reviews --for=condition=Ready --timeout=600s
kubectl get all -o wide
kubectl get nodes -o yaml
ifconfig
netstat -anr
- name: Test
run: go test -v ./test/
# windows:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2
#
# - name: Set up Go
# uses: actions/setup-go@v2
# with:
# go-version: 1.17
# # - run: |
# # choco install docker-desktop
# # docker version
# # docker run --rm hello-world
# - run: |
# choco install virtualbox
# choco install minikube
# minikube start --driver=virtualbox
# minikube kubectl -- get po -A
# choco install make
# - name: Kubernetes info
# run: |
# kubectl cluster-info dump
# kubectl get pods -n kube-system -o wide
# - name: Install demo bookinfo
# run: kubectl apply -f https://raw.githubusercontent.com/wencaiwulue/kubevpn/master/samples/bookinfo.yaml
#
# - name: Build
# run: make kubevpn-windows
#
# - name: Wait for pods reviews to be ready
# run: |
# kubectl wait pods -l app=reviews --for=condition=Ready --timeout=600s
# kubectl get all -o wide
# kubectl get nodes -o yaml
# ipconfig
#
# - name: Test
# run: go test -v ./test/